/[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 25 by matty, Sat Jan 6 03:47:04 2001 UTC revision 30 by matty, Fri Sep 14 13:51:38 2001 UTC
# Line 1  Line 1 
1  /*  /*
2     rdesktop: A Remote Desktop Protocol client.     rdesktop: A Remote Desktop Protocol client.
3     Protocol services - TCP layer     Protocol services - TCP layer
4     Copyright (C) Matthew Chapman 1999-2000     Copyright (C) Matthew Chapman 1999-2001
5        
6     This program is free software; you can redistribute it and/or modify     This program is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by     it under the terms of the GNU General Public License as published by
# Line 60  tcp_send(STREAM s) Line 60  tcp_send(STREAM s)
60    
61                  if (sent <= 0)                  if (sent <= 0)
62                  {                  {
63                          STATUS("write: %s\n", strerror(errno));                          error("write: %s\n", strerror(errno));
64                          return;                          return;
65                  }                  }
66    
# Line 101  tcp_recv(int length) Line 101  tcp_recv(int length)
101    
102                          if (rcvd <= 0)                          if (rcvd <= 0)
103                          {                          {
104                                  STATUS("read: %s\n", strerror(errno));                                  error("read: %s\n", strerror(errno));
105                                  return NULL;                                  return NULL;
106                          }                          }
107    
# Line 128  tcp_connect(char *server) Line 128  tcp_connect(char *server)
128          }          }
129          else if (!(servaddr.sin_addr.s_addr = inet_addr(server)))          else if (!(servaddr.sin_addr.s_addr = inet_addr(server)))
130          {          {
131                  STATUS("%s: unable to resolve host\n", server);                  error("%s: unable to resolve host\n", server);
132                  return False;                  return False;
133          }          }
134    
135          if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0)          if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0)
136          {          {
137                  STATUS("socket: %s\n", strerror(errno));                  error("socket: %s\n", strerror(errno));
138                  return False;                  return False;
139          }          }
140    
# Line 145  tcp_connect(char *server) Line 145  tcp_connect(char *server)
145              (sock, (struct sockaddr *) &servaddr,              (sock, (struct sockaddr *) &servaddr,
146               sizeof(struct sockaddr)) < 0)               sizeof(struct sockaddr)) < 0)
147          {          {
148                  STATUS("connect: %s\n", strerror(errno));                  error("connect: %s\n", strerror(errno));
149                  close(sock);                  close(sock);
150                  return False;                  return False;
151          }          }

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

  ViewVC Help
Powered by ViewVC 1.1.26