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

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
RevLine 
[56]1/*
2 *  Abuse - dark 2D side-scrolling platform game
3 *  Copyright (c) 1995 Crack dot Com
[494]4 *  Copyright (c) 2005-2011 Sam Hocevar <sam@hocevar.net>
[56]5 *
6 *  This software was released into the Public Domain. As with most public
[555]7 *  domain software, no warranty is made or implied by Crack dot Com, by
8 *  Jonathan Clark, or by Sam Hocevar.
[56]9 */
10
[555]11#if defined HAVE_CONFIG_H
12#   include "config.h"
13#endif
[56]14
[2]15#include <stdlib.h>
16
[481]17#include "sock.h"
[56]18
[2]19const char notify_signature[] = "I wanna play ABUSE!";
20const char notify_response[] = "Yes!";
21
22net_protocol *net_protocol::first=0;
23
[651]24#if HAVE_NETWORK
[2]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
[39]29net_socket *net_protocol::connect_to_server(char const *&server_name, int port, int force_port, net_socket::socket_type sock_type)
[2]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}
[651]37#endif
[2]38
Note: See TracBrowser for help on using the repository browser.