source: abuse/tags/pd/imlib/port/dos4gw/bwtcp.hpp @ 528

Last change on this file since 528 was 49, checked in by Sam Hocevar, 15 years ago
  • Imported original public domain release, for future reference.
File size: 765 bytes
RevLine 
[49]1#include "jnet.hpp"
2#define PK_BUFFER_SIZE 4096
3
4class bwt_out_socket : public out_socket
5{
6  int fd;
7  public :
8  uchar pk_buffer[PK_BUFFER_SIZE]; 
9  long pk_buffer_ro,pk_buffer_last;
10  int try_connect(char *rhost, int port);
11  bwt_out_socket(int FD) { fd=FD; }
12  bwt_out_socket();
13  virtual int ready_to_read();
14  virtual int ready_to_write();
15  virtual int send(packet &pk);
16  virtual int get(packet &pk);
17  virtual ~bwt_out_socket();
18  void bwt_fill_buffer();
19  int get_fd() { return fd; }
20} ;
21
22
23class bwt_in_socket : public in_socket
24{
25  int port;
26  public :
27  bwt_in_socket(int Port);
28  bwt_out_socket *listeners[5];
29  virtual out_socket *check_for_connect();
30  virtual ~bwt_in_socket();
31} ;
32
33
34int bwt_init();
35void bwt_uninit();
36int bwt_get_my_ip();
37
38
39
40
41
42
43
44
Note: See TracBrowser for help on using the repository browser.