/[rdesktop]/sourceforge.net/trunk/rdesktop/tcp.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/trunk/rdesktop/tcp.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 24 by matty, Sat Jan 6 03:12:10 2001 UTC revision 25 by matty, Sat Jan 6 03:47:04 2001 UTC
# Line 33  static struct stream in; Line 33  static struct stream in;
33  static struct stream out;  static struct stream out;
34    
35  /* Initialise TCP transport data packet */  /* Initialise TCP transport data packet */
36  STREAM tcp_init(int maxlen)  STREAM
37    tcp_init(int maxlen)
38  {  {
39          if (maxlen > out.size)          if (maxlen > out.size)
40          {          {
# Line 47  STREAM tcp_init(int maxlen) Line 48  STREAM tcp_init(int maxlen)
48  }  }
49    
50  /* Send TCP transport data packet */  /* Send TCP transport data packet */
51  void tcp_send(STREAM s)  void
52    tcp_send(STREAM s)
53  {  {
54          int length = s->end - s->data;          int length = s->end - s->data;
55          int sent, total = 0;          int sent, total = 0;
# Line 67  void tcp_send(STREAM s) Line 69  void tcp_send(STREAM s)
69  }  }
70    
71  /* Receive a message on the TCP layer */  /* Receive a message on the TCP layer */
72  STREAM tcp_recv(int length)  STREAM
73    tcp_recv(int length)
74  {  {
75          int ret, rcvd = 0;          int ret, rcvd = 0;
76          struct timeval tv;          struct timeval tv;
# Line 111  STREAM tcp_recv(int length) Line 114  STREAM tcp_recv(int length)
114  }  }
115    
116  /* Establish a connection on the TCP layer */  /* Establish a connection on the TCP layer */
117  BOOL tcp_connect(char *server)  BOOL
118    tcp_connect(char *server)
119  {  {
120          struct hostent *nslookup;          struct hostent *nslookup;
121          struct sockaddr_in servaddr;          struct sockaddr_in servaddr;
# Line 159  BOOL tcp_connect(char *server) Line 163  BOOL tcp_connect(char *server)
163  }  }
164    
165  /* Disconnect on the TCP layer */  /* Disconnect on the TCP layer */
166  void tcp_disconnect()  void
167    tcp_disconnect()
168  {  {
169          close(sock);          close(sock);
170  }  }

Legend:
Removed from v.24  
changed lines
  Added in v.25

  ViewVC Help
Powered by ViewVC 1.1.26