Ignore:
Timestamp:
Mar 18, 2008, 9:36:56 PM (11 years ago)
Author:
Sam Hocevar
Message:
  • Get rid of ugly tabs and trailing spaces everywhere.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/net/sock.hpp

    r112 r124  
    66
    77class net_address
    8 { 
     8{
    99  public :
    1010  enum protocol { IP, IPX, MODEM, NETBIOS, OTHER };
     
    5656  enum connect_flags
    5757  { READ_WRITE,          // flags for connect to server
    58                 WRITE_ONLY } ;
     58         WRITE_ONLY } ;
    5959
    6060
     
    6767  virtual net_address *get_local_address() = 0;
    6868  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                                         net_socket::socket_type sock_type=net_socket::SOCKET_SECURE) =0;
     69  virtual net_socket *connect_to_server(net_address *addr,
     70                    net_socket::socket_type sock_type=net_socket::SOCKET_SECURE) =0;
    7171  virtual net_socket *create_listen_socket(int port, net_socket::socket_type sock_type) = 0;
    7272  virtual int installed() = 0;
     
    7474  virtual int select(int block) = 0;          // return # of sockets available for read & writing
    7575  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);
    7878
    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
     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
    8787
    88         // Find methods
     88    // Find methods
    8989  virtual net_address *find_address(int port, char *name) { return 0; }   // name should be a 256 byte buffer
    9090  virtual void reset_find_list() { ; }
Note: See TracChangeset for help on using the changeset viewer.