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

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