source: abuse/tags/pd/abuse/src/net/sock.c @ 49

Last change on this file since 49 was 49, checked in by Sam Hocevar, 11 years ago
  • Imported original public domain release, for future reference.
  • Property svn:keywords set to Id
File size: 657 bytes
Line 
1#include "sock.hpp"
2#include <stdlib.h>
3
4const char notify_signature[] = "I wanna play ABUSE!";
5const char notify_response[] = "Yes!";
6
7net_protocol *net_protocol::first=0;
8
9// connect to an explictedly named address
10// first try to get the address and then try to connect
11// return NULL if either fail.  This method does not need to be implemented
12// in sub-classes
13
14net_socket *net_protocol::connect_to_server(char *&server_name, int port, int force_port, net_socket::socket_type sock_type)
15{
16  net_address *a=get_node_address(server_name,port,force_port);
17  if (!a) return NULL;
18  net_socket *s=connect_to_server(a,sock_type);
19  delete a;
20  return s;
21}
22
Note: See TracBrowser for help on using the repository browser.