[BACK]Return to mysocket.c CVS log [TXT][DIR] Up to [local] / OpenXM / src / ox_toolkit

Diff for /OpenXM/src/ox_toolkit/mysocket.c between version 1.3 and 1.4

version 1.3, 2000/01/13 07:57:09 version 1.4, 2000/10/10 05:23:20
Line 1 
Line 1 
 /* -*- mode: C; coding: euc-japan -*- */  /* -*- mode: C; coding: euc-japan -*- */
 /* $OpenXM: OpenXM/src/ox_toolkit/mysocket.c,v 1.2 2000/01/05 06:05:35 ohara Exp $ */  /* $OpenXM: OpenXM/src/ox_toolkit/mysocket.c,v 1.3 2000/01/13 07:57:09 ohara Exp $ */
 /*  /*
 Q: How to get a local port number?  Q: How to get a local port number?
 A: You do setsockopt() to set options and do socket(), bind().  A: You do setsockopt() to set options and do socket(), bind().
Line 16  Reference
Line 16  Reference
 #include <unistd.h>  #include <unistd.h>
 #include <errno.h>  #include <errno.h>
 #include <netdb.h>  #include <netdb.h>
   #include <string.h>
 #include <netinet/in.h>  #include <netinet/in.h>
 #include <sys/types.h>  #include <sys/types.h>
 #include <sys/socket.h>  #include <sys/socket.h>
Line 41  static int getsocket(struct sockaddr_in *mp, char *hos
Line 42  static int getsocket(struct sockaddr_in *mp, char *hos
   
 int mysocketAccept(int s_waiting)  int mysocketAccept(int s_waiting)
 {  {
     int val = accept(s_waiting, NULL, NULL);      return accept(s_waiting, NULL, NULL);
     return val;  
 }  }
   
 int mysocketListen(char *hostname, short *portp)  int mysocketListen(char *hostname, short *portp)

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>