/[monit]/monit/net.c
ViewVC logotype

Diff of /monit/net.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.34 by martinp, Sat Sep 13 17:18:38 2003 UTC revision 1.35 by martinp, Sun Sep 14 13:14:17 2003 UTC
# Line 341  int create_unix_socket(const char *pathn Line 341  int create_unix_socket(const char *pathn
341    
342    
343  /**  /**
344   * Create a blocking server socket and bind it to the specified local   * Create a non-blocking server socket and bind it to the specified local
345   * port number, with the specified backlog. Set a socket option to   * port number, with the specified backlog. Set a socket option to
346   * make the port reusable again. If a bind address is given the socket   * make the port reusable again. If a bind address is given the socket
347   * will only accept connect requests to this addresses. If the bind   * will only accept connect requests to this addresses. If the bind
# Line 380  int create_server_socket(int port, int b Line 380  int create_server_socket(int port, int b
380    if(setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *)&flag, sizeof(int)) < 0)    if(setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *)&flag, sizeof(int)) < 0)
381      goto error;      goto error;
382        
383      if(! set_noblock(s))
384        goto error;
385    
386    if(bind(s, (struct sockaddr *)&myaddr, sizeof(struct sockaddr_in)) < 0)    if(bind(s, (struct sockaddr *)&myaddr, sizeof(struct sockaddr_in)) < 0)
387      goto error;      goto error;
388        

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26