Last change
on this file since 43 was
39,
checked in by Sam Hocevar, 15 years ago
|
- Fix almost 2,000 warnings by using proper "const" keywords where needed.
|
File size:
663 bytes
|
Rev | Line | |
---|
[2] | 1 | #include "sock.hpp" |
---|
| 2 | #include <stdlib.h> |
---|
| 3 | |
---|
| 4 | const char notify_signature[] = "I wanna play ABUSE!"; |
---|
| 5 | const char notify_response[] = "Yes!"; |
---|
| 6 | |
---|
| 7 | net_protocol *net_protocol::first=0; |
---|
| 8 | |
---|
| 9 | // connect to an explictedly named address |
---|
| 10 | // first try to get the address and then try to connect |
---|
| 11 | // return NULL if either fail. This method does not need to be implemented |
---|
| 12 | // in sub-classes |
---|
| 13 | |
---|
[39] | 14 | net_socket *net_protocol::connect_to_server(char const *&server_name, int port, int force_port, net_socket::socket_type sock_type) |
---|
[2] | 15 | { |
---|
| 16 | net_address *a=get_node_address(server_name,port,force_port); |
---|
| 17 | if (!a) return NULL; |
---|
| 18 | net_socket *s=connect_to_server(a,sock_type); |
---|
| 19 | delete a; |
---|
| 20 | return s; |
---|
| 21 | } |
---|
| 22 | |
---|
Note: See
TracBrowser
for help on using the repository browser.