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

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

style: remove trailing spaces, fix copyright statements.

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