Hi all,
currently i'm working on a client-server application...
when doing an UDP-broadcast the packet is received ok, at the other side,
but for some reason after that
_ANOTHER_ packet is received that has source-address 255.255.255.255, which
i didn't send.
This packet generates an error when received :( :
error 10054 - connection reset by peer
below is what i use to receive, and the piece of code to set the options:
----------------------------------------------------------------------------
--------------------------------------------
recvfrom( GlobalSocket, tempBuff, sizeof(tempBuff), (int)NULL, (SOCKADDR
*)&remote_sockaddr_in,(int *) )
----------------------------------------------------------------------------
--------------------------------------------
&remote_sockaddr_length);
//ENABLE BROADCAST
BOOL fBroadcast = TRUE;
int err = setsockopt ( GlobalSocket,
SOL_SOCKET,
SO_BROADCAST,
(CHAR *) &fBroadcast,
sizeof ( BOOL )
);
----------------------------------------------------------------------------
--------------------------------------------
Is anybody familiar with this? What could be causing this?
Thanks in advance,
Mark 2 8797
> currently i'm working on a client-server application... when doing an UDP-broadcast the packet is received ok, at the other
side, but for some reason after that _ANOTHER_ packet is received that has source-address 255.255.255.255,
which i didn't send.
This packet generates an error when received :( : error 10054 - connection reset by peer
below is what i use to receive, and the piece of code to set the
options: ----------------------------------------------------------------------
------ -------------------------------------------- recvfrom( GlobalSocket, tempBuff, sizeof(tempBuff), (int)NULL,
(SOCKADDR *)&remote_sockaddr_in,(int *) ) ----------------------------------------------------------------------
------ -------------------------------------------- &remote_sockaddr_length); file://ENABLE BROADCAST BOOL fBroadcast = TRUE; int err = setsockopt ( GlobalSocket, SOL_SOCKET, SO_BROADCAST, (CHAR *) &fBroadcast, sizeof ( BOOL ) ); ----------------------------------------------------------------------
------ -------------------------------------------- Is anybody familiar with this? What could be causing this?
Standard C++ has no support for socket communication, hence your
question is off-topic here. For suggestions were to post read this http://home.wanadoo.nl/efx/c++-faq/h...t.html#faq-5.9 and this http://www.slack.net/~shiva/welcome.txt
--
Peter van Merkerk
peter.van.merkerk(at)dse.nl
Oops, sorry...
Anyway...problem is solved now....seems that the packets where too long :s
"Peter van Merkerk" <me*****@deadspam.com> wrote in message
news:bi************@ID-133164.news.uni-berlin.de... currently i'm working on a client-server application... when doing an UDP-broadcast the packet is received ok, at the other side, but for some reason after that _ANOTHER_ packet is received that has source-address 255.255.255.255, which i didn't send.
This packet generates an error when received :( : error 10054 - connection reset by peer
below is what i use to receive, and the piece of code to set the options: ---------------------------------------------------------------------- ------ -------------------------------------------- recvfrom( GlobalSocket, tempBuff, sizeof(tempBuff), (int)NULL, (SOCKADDR *)&remote_sockaddr_in,(int *) ) ---------------------------------------------------------------------- ------ -------------------------------------------- &remote_sockaddr_length); file://ENABLE BROADCAST BOOL fBroadcast = TRUE; int err = setsockopt ( GlobalSocket, SOL_SOCKET, SO_BROADCAST, (CHAR *) &fBroadcast, sizeof ( BOOL ) ); ---------------------------------------------------------------------- ------ -------------------------------------------- Is anybody familiar with this? What could be causing this?
Standard C++ has no support for socket communication, hence your question is off-topic here. For suggestions were to post read this http://home.wanadoo.nl/efx/c++-faq/h...t.html#faq-5.9 and this http://www.slack.net/~shiva/welcome.txt
-- Peter van Merkerk peter.van.merkerk(at)dse.nl
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: pekspro |
last post by:
I need some code that gets the address from a server. I read somewhere
that you could do this by starting some broadcast server using UDP. The
client should send an broadcast message, and when the...
|
by: Frank Esser |
last post by:
Hello!
I have got machines that answer a certain UDP broadcast request with certain
information about them.
Some years ago I wrote a VB6 application that just sent out this UDP
broadcast...
|
by: gregory_may |
last post by:
First the research links:
IPv6 spec (look for 'jumbo payload'):
http://www.cs-ipv6.lancs.ac.uk/ipv6/documents/rfcs/archive/rfc1883.txt
IPv6 Sample C# Client/Server...
|
by: salman |
last post by:
Hello
i am working on real time application, there is many clients in
network, some connected locally LAN and some via VPN through RAS
(remote access service), I am facing problem to broadcast the...
|
by: salman |
last post by:
Hello
I have local network with ip(s) 192.168.1.x, and i am creating VPN
through RAS- Remote Access Service (window server 2003) of ip range
from 10.0.0.10 - 10.0.0.255. client are connecting to...
|
by: sreehari |
last post by:
Hi All,
I have this problem,
I have developed a Master - Slave kinda appliacation , were the slave
is generally a device.when i broadcast a message from my application,
the Device seems to...
|
by: Sagittarius |
last post by:
Hi there.
I have a problem concerning an UDP socket in C++ (Winsock).
The next paragraphs is merely to explain the system I am working on. If U want to skip it, I have marked the question in...
|
by: Irmen de Jong |
last post by:
Hello
Sorry this might be a bit offtopic but I don't really know where else
to post this question. If you could point me in the right direction that
is much appreciated.
I'm running into a...
|
by: Mali Findik |
last post by:
Hi @ll,
i've got problems with sending an UDP broadcast datagramm over two
network interfaces.
The code is like this:
<Code>
UdpClient client = new UdpClient();
IPEndPoint remoteEndPoint =...
|
by: raviskar |
last post by:
Hi,
I have a problem in receiving UDP broadcast data. We have a simple application which listens for the UDP broadcast data from the external servers. We can receive the UDP broadcast data from...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |