Board index » Visual Studio » accept() and SOCK_DGRAM

accept() and SOCK_DGRAM

Visual Studio266
From my tests I can see that accept() is not called when using SOCK_DGRAM,

only when using SOCK_STREAM, when creating the SOCKET. How can you make sure

the connection is established in SOCK_DGRAM before you start trying to send

data?


-
 

Re:accept() and SOCK_DGRAM

Hi aaa!

Quote
From my tests I can see that accept() is not called when using SOCK_DGRAM,

only when using SOCK_STREAM, when creating the SOCKET. How can you make sure

the connection is established in SOCK_DGRAM before you start trying to send

data?



???? Have you read the docu of the ISO/OSI-model?

The difference between stream and datagram is the a stream is

"connection-oriented" and a datagram is not...



Therefor a datagram will never have a connection... this also implies

that messages might get lost...



--

Greetings

Jochen



My blog about Win32 and .NET

blog.kalmbachnet.de/">blog.kalmbachnet.de/

-