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

Last change on this file since 56 was 56, checked in by Sam Hocevar, 15 years ago
  • Add licensing terms to most C / C++ files (Ref #5).
File size: 949 bytes
Line 
1/*
2 *  Abuse - dark 2D side-scrolling platform game
3 *  Copyright (c) 1995 Crack dot Com
4 *
5 *  This software was released into the Public Domain. As with most public
6 *  domain software, no warranty is made or implied by Crack dot Com or
7 *  Jonathan Clark.
8 */
9
10#include "config.h"
11
12#include <stdlib.h>
13
14#include "sock.hpp"
15
16const char notify_signature[] = "I wanna play ABUSE!";
17const char notify_response[] = "Yes!";
18
19net_protocol *net_protocol::first=0;
20
21// connect to an explictedly named address
22// first try to get the address and then try to connect
23// return NULL if either fail.  This method does not need to be implemented
24// in sub-classes
25
26net_socket *net_protocol::connect_to_server(char const *&server_name, int port, int force_port, net_socket::socket_type sock_type)
27{
28  net_address *a=get_node_address(server_name,port,force_port);
29  if (!a) return NULL;
30  net_socket *s=connect_to_server(a,sock_type);
31  delete a;
32  return s;
33}
34
Note: See TracBrowser for help on using the repository browser.