Sockets: Difference between revisions
Content deleted Content added
Added Oz. |
|||
Line 167: | Line 167: | ||
#include <netdb.h> |
#include <netdb.h> |
||
char msg |
const char *msg = "hello socket world"; |
||
int main() |
int main() |
||
Line 185: | Line 185: | ||
if ( connect(sock, addrs->ai_addr, addrs->ai_addrlen) >= 0 ) |
if ( connect(sock, addrs->ai_addr, addrs->ai_addrlen) >= 0 ) |
||
{ |
{ |
||
char *pm = msg; |
const char *pm = msg; |
||
do |
do |
||
{ |
{ |