Explain SOCK DGRAM in socket programming?
karthi 26-October-2007 06:29:33 PM

Comments


Works for STREAM and DGRAM. /* Connect to the server */. if ((sock = socket( AF_INET, SOCK_STREAM, 0)) == -1). {. /* Complain, explain, and exit */ ...
Posted by waqasahmad


SOCK_DGRAM:
- if only sending, no need to bind. The OS finds a port each time the socket sends a pkt
- if receiving, need to bind

Posted by vasunair



Posted: 26-October-2007 06:36:41 PM By: vasunair

SOCK_DGRAM:
- if only sending, no need to bind. The OS finds a port each time the socket sends a pkt
- if receiving, need to bind

Posted: 30-December-2008 11:51:58 PM By: waqasahmad

Works for STREAM and DGRAM. /* Connect to the server */. if ((sock = socket( AF_INET, SOCK_STREAM, 0)) == -1). {. /* Complain, explain, and exit */ ...