Re: Unicast UDP Server



On Mar 27, 10:07 pm, "Peter Duniho" <NpOeStPe...@xxxxxxxxxxxxxxxx>
wrote:
On Thu, 27 Mar 2008 19:07:05 -0700, O.B. <funkj...@xxxxxxxxxxxxx> wrote:
I'm attempting to set up at UDP server in unicast mode, where
10.1.16.25 is the remote machine. Below is the error being thrown
when binding the socket. What am I doing wrong?

You're trying to bind your local socket to a remote address.

If you want to specify a remote address to be used as the default
destination for the UDP socket, use Connect(), not Bind().

But that would require the remote connection to be Bound to that port
to accept connections. Here is the dilemma. We have a user that has
other commercial software that is only capable of running their
sockets as client UDP broadcast connections on a fixed port. On our
end, the user wants the ability to open two UDP servers both on the
same port, but for each one to filter based on the IP that is sending
data. I was hoping that it would be possible to do this in the
connection setup rather than having our asynchronous receive callback
do the filtering.

With that said, what is the point of binding to a specific address if
it isn't allowed?

By the way...IMHO, you shouldn't be messing with the socket buffer sizes
unless you have already gotten everything else working, you know exactly
what you're doing, _and_ you have run into some problem that requires you
to change the default buffer sizes.

We started off with defaults and lost too many packets. 75 MB ended
up being a good number. Most of our machines are running with 4 GB or
more of memory, so it isn't an issue.
.



Relevant Pages

  • Re: How to tell when a socket is closed on the other end?
    ... remote server is behaving properly by closing a socket from the server side ... preferably determine if it was closed from the remote end as expected. ... All you know is that the connection did indeed get shut down. ... The SMTP user-level protocol sent "221 Bye", then, my telnet client saw the ...
    (comp.lang.python)
  • Re: SOCKET_ERROR [10054]
    ... using SocketWrench .net component. ... connection was forcibly closed by the remote host. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: getting client ip in sock-client on server
    ... getsockname using PInvoke mechanism. ... will give you the remote address and getsockname will give you the local ... address for the connection. ... socket handle and pass it into these API as parameters. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Tcp Sockets Close event
    ... in the old vb6 winsock object there was an Event raised when the remote side ... Closed the socket connection, ... > into the sample code to see how we handle the events generally. ...
    (microsoft.public.dotnet.academic)
  • [PATCH 0/5] [RFC] AF_RXRPC socket family implementation [try #3]
    ... These patches together supply secure client-side RxRPC connectivity as a Linux ... kernel socket family. ... presentation side is left to the client. ... Each connection goes to a particular "service". ...
    (Linux-Kernel)

Loading