Changeset 124 for abuse/trunk/src/net/sock.hpp
- Timestamp:
- Mar 18, 2008, 9:36:56 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
abuse/trunk/src/net/sock.hpp
r112 r124 6 6 7 7 class net_address 8 { 8 { 9 9 public : 10 10 enum protocol { IP, IPX, MODEM, NETBIOS, OTHER }; … … 56 56 enum connect_flags 57 57 { READ_WRITE, // flags for connect to server 58 58 WRITE_ONLY } ; 59 59 60 60 … … 67 67 virtual net_address *get_local_address() = 0; 68 68 virtual net_address *get_node_address(char const *&server_name, int def_port, int force_port) = 0; 69 virtual net_socket *connect_to_server(net_address *addr, 70 69 virtual net_socket *connect_to_server(net_address *addr, 70 net_socket::socket_type sock_type=net_socket::SOCKET_SECURE) =0; 71 71 virtual net_socket *create_listen_socket(int port, net_socket::socket_type sock_type) = 0; 72 72 virtual int installed() = 0; … … 74 74 virtual int select(int block) = 0; // return # of sockets available for read & writing 75 75 virtual void cleanup() { ; } // should do any needed pre-exit cleanup stuff 76 net_socket *connect_to_server(char const *&server_name, int port, int force_port=0, 77 net_socket::socket_type sock_type=net_socket::SOCKET_SECURE); 76 net_socket *connect_to_server(char const *&server_name, int port, int force_port=0, 77 net_socket::socket_type sock_type=net_socket::SOCKET_SECURE); 78 78 79 80 81 82 83 84 85 86 // and wait for any responses 79 // Notification methods 80 virtual net_socket *start_notify(int port, void *data, int len) { return 0; } 81 virtual void end_notify() {} 82 // for protocols that don't know how to find address without help, start_notify creates 83 // a fast/connectionless socket to respond to find address request packets. After start_notify, 84 // protocol::select should automatically forward the specified data to all requesters. 85 // find_address should "broadcast" a notification request packet to all addresses it can 86 // and wait for any responses 87 87 88 88 // Find methods 89 89 virtual net_address *find_address(int port, char *name) { return 0; } // name should be a 256 byte buffer 90 90 virtual void reset_find_list() { ; }
Note: See TracChangeset
for help on using the changeset viewer.