Click here to Skip to main content
16,006,442 members
Home / Discussions / C#
   

C#

 
GeneralMouse Capture Pin
Alex Korchemniy27-Aug-02 15:12
Alex Korchemniy27-Aug-02 15:12 
GeneralRe: Mouse Capture Pin
Alastair Stell27-Aug-02 17:04
Alastair Stell27-Aug-02 17:04 
GeneralError when converting to use UDP Pin
Luis Alonso Ramos27-Aug-02 14:34
Luis Alonso Ramos27-Aug-02 14:34 
GeneralRe: Error when converting to use UDP Pin
Michael Mac28-Aug-02 2:15
Michael Mac28-Aug-02 2:15 
GeneralRe: Error when converting to use UDP Pin
Luis Alonso Ramos28-Aug-02 3:04
Luis Alonso Ramos28-Aug-02 3:04 
GeneralRe: Error when converting to use UDP Pin
Michael Mac28-Aug-02 3:51
Michael Mac28-Aug-02 3:51 
GeneralRe: Error when converting to use UDP Pin
Luis Alonso Ramos28-Aug-02 4:14
Luis Alonso Ramos28-Aug-02 4:14 
GeneralRe: Error when converting to use UDP Pin
Russell Morris28-Aug-02 4:36
Russell Morris28-Aug-02 4:36 
From what I remember, UDP is a connectionless protocol. Unlike TCP, UDP has no notion of an explicit 'connection' being made to a server socket, which is most likely why this exception is being thrown.

TCP is designed to guaruntee data delivery or to notify the sender and receiver of a delivery failure. In order to do this it keeps alot of state behind the scenes, thus necessitating the 'connection' metaphor.

UDP, however, is much more like IP in that it is a "best effort" delivery protocol. If you send data over UDP, it will most likely get their in good shape. However, it's up to the person reading from the UDP stream to figure out whether or not the data they got has been corrupted.

Long story short - there is no such thing as a 'Connection' or a 'Listen socket' in UDP. If you want to send a data packet via UDP, you specify the data you want to send along with the IP address and port # you want to send it to. You do this for every send() call. Same type of thing with receive() on UDP. You don't connect to a server socket like you would with TCP, you just recv() on a specific port # and wait for someone to send a UDP packet to that port.

My only experience with writing UDP code is in straight C on Unix, so I'm not sure how this would be implemented in the .NET FCL...

--
Russell Morris

"Have you gone mad Frink? Put down that science pole!"
GeneralRe: Error when converting to use UDP Pin
Luis Alonso Ramos28-Aug-02 4:44
Luis Alonso Ramos28-Aug-02 4:44 
GeneralQuick Question Pin
Alex Korchemniy27-Aug-02 8:57
Alex Korchemniy27-Aug-02 8:57 
GeneralRe: Quick Question Pin
leppie27-Aug-02 9:38
leppie27-Aug-02 9:38 
GeneralRe: Quick Question Pin
Andy Smith27-Aug-02 9:55
Andy Smith27-Aug-02 9:55 
GeneralRe: Quick Question Pin
leppie27-Aug-02 11:30
leppie27-Aug-02 11:30 
GeneralRe: Quick Question Pin
Christian Graus27-Aug-02 12:06
protectorChristian Graus27-Aug-02 12:06 
GeneralThanks Pin
Alex Korchemniy27-Aug-02 14:58
Alex Korchemniy27-Aug-02 14:58 
GeneralCursor Blink Rate Pin
Nnamdi Onyeyiri27-Aug-02 8:52
Nnamdi Onyeyiri27-Aug-02 8:52 
GeneralDestructor problem Pin
leppie27-Aug-02 7:55
leppie27-Aug-02 7:55 
GeneralRe: Destructor problem Pin
Michael Mac27-Aug-02 8:15
Michael Mac27-Aug-02 8:15 
GeneralRe: Destructor problem Pin
leppie27-Aug-02 9:40
leppie27-Aug-02 9:40 
GeneralRe: Destructor problem Pin
Michael Mac27-Aug-02 11:38
Michael Mac27-Aug-02 11:38 
GeneralRe: Destructor problem Pin
Michael Mac27-Aug-02 11:41
Michael Mac27-Aug-02 11:41 
GeneralRe: Destructor problem Pin
Nnamdi Onyeyiri27-Aug-02 21:15
Nnamdi Onyeyiri27-Aug-02 21:15 
GeneralRe: Destructor problem Pin
Michael Mac28-Aug-02 0:15
Michael Mac28-Aug-02 0:15 
GeneralRe: Destructor problem Pin
Nnamdi Onyeyiri27-Aug-02 8:49
Nnamdi Onyeyiri27-Aug-02 8:49 
GeneralRe: Destructor problem Pin
David Stone27-Aug-02 11:49
sitebuilderDavid Stone27-Aug-02 11:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.