Last change
on this file since 651 was
651,
checked in by Sam Hocevar, 12 years ago
|
build: add a --disable-network compilation flag and get rid of most of
the CELLOS_LV2 ifdefs.
|
File size:
1.1 KB
|
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, by |
---|
8 | * Jonathan Clark, or by Sam Hocevar. |
---|
9 | */ |
---|
10 | |
---|
11 | #if defined HAVE_CONFIG_H |
---|
12 | # include "config.h" |
---|
13 | #endif |
---|
14 | |
---|
15 | #include <stdlib.h> |
---|
16 | |
---|
17 | #include "sock.h" |
---|
18 | |
---|
19 | const char notify_signature[] = "I wanna play ABUSE!"; |
---|
20 | const char notify_response[] = "Yes!"; |
---|
21 | |
---|
22 | net_protocol *net_protocol::first=0; |
---|
23 | |
---|
24 | #if HAVE_NETWORK |
---|
25 | // connect to an explictedly named address |
---|
26 | // first try to get the address and then try to connect |
---|
27 | // return NULL if either fail. This method does not need to be implemented |
---|
28 | // in sub-classes |
---|
29 | net_socket *net_protocol::connect_to_server(char const *&server_name, int port, int force_port, net_socket::socket_type sock_type) |
---|
30 | { |
---|
31 | net_address *a=get_node_address(server_name,port,force_port); |
---|
32 | if (!a) return NULL; |
---|
33 | net_socket *s=connect_to_server(a,sock_type); |
---|
34 | delete a; |
---|
35 | return s; |
---|
36 | } |
---|
37 | #endif |
---|
38 | |
---|
Note: See
TracBrowser
for help on using the repository browser.