Re: UDP sockets



PH wrote:
Hi guys;

I got to make an application that listens for incoming UDP connections in 2 different ports at the same time.

Also this application must only let pass thru connection attempts coming from certain IP addresses, and discard the rest.

Any code, suggestion or help will be much appreciated.

UDP is connectionless. You probably only want to accept packets from certain IP addresses. Lookup the MSDN docs for the Socket class. The methods Bind, Listen and ReceiveFrom are what you need.

hth,
Max
.



Relevant Pages

  • Re: Help with Iptables on with RH linux
    ... several ports that it listens... ... any established connections are OK. ... If you are dropping packets in the FORWARD chain, ... You can adjust these rules to allow only certain protocols and ports. ...
    (RedHat)
  • Re: mail delivery on LAN
    ... >>The default sendmail config does this without allowing ... >>connections from remote machines (only listens for ... >>connections from 127.0.0.1). ...
    (RedHat)
  • Re: How to implement a daemon like xinetd?
    ... |> the subprocess is needed) for other connections. ... socket() creates the ...
    (comp.os.linux.development.system)
  • Re: How to implement a daemon like xinetd?
    ... |> the subprocess is needed) for other connections. ... socket() creates the ...
    (comp.os.linux.development.system)
  • Re: A beginners question on thread
    ... > In order to respond to both the user and the incoming connections I ... > thread which listens on a socket. ... how do I terminate the server thread if user wants ...
    (comp.lang.python)