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

Last change on this file since 481 was 481, checked in by Sam Hocevar, 11 years ago

Fuck the history, I'm renaming all .hpp files to .h for my own sanity.

File size: 947 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.h"
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.