source: abuse/trunk/src/net/sock.cpp @ 2

Last change on this file since 2 was 2, checked in by Sam Hocevar, 14 years ago
  • imported original 0.7.0 tarball
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.