/[gcl]/gcl/o/nsocket.c
ViewVC logotype

Diff of /gcl/o/nsocket.c

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

revision 1.10 by camm, Thu Feb 12 05:24:42 2004 UTC revision 1.11 by camm, Sat Jul 23 08:54:15 2005 UTC
# Line 329  DEFUN_NEW("GETPEERNAME",object,fSgetpeer Line 329  DEFUN_NEW("GETPEERNAME",object,fSgetpeer
329   "Return a list of three elements: the address, the hostname and the port for the other end of the socket.  If hostname is not available it will be equal to the address.  Invalid on server sockets. Return NIL on failure.")   "Return a list of three elements: the address, the hostname and the port for the other end of the socket.  If hostname is not available it will be equal to the address.  Invalid on server sockets. Return NIL on failure.")
330  {  {
331   struct sockaddr_in peername;   struct sockaddr_in peername;
332   int size = sizeof(struct sockaddr_in);   unsigned size = sizeof(struct sockaddr_in);
333   struct hostent *hostEntPtr;   struct hostent *hostEntPtr;
334   object address,host;   object address,host;
335   check_socket(sock);   check_socket(sock);
# Line 351  DEFUN_NEW("GETPEERNAME",object,fSgetpeer Line 351  DEFUN_NEW("GETPEERNAME",object,fSgetpeer
351  DEFUN_NEW("GETSOCKNAME",object,fSgetsockname,SI,1,1,NONE,OO,OO,OO,OO,(object sock),  DEFUN_NEW("GETSOCKNAME",object,fSgetsockname,SI,1,1,NONE,OO,OO,OO,OO,(object sock),
352   "Return a list of three elements: the address, the hostname and the port for the socket.  If hostname is not available it will be equal to the address. Return NIL on failure. ")   "Return a list of three elements: the address, the hostname and the port for the socket.  If hostname is not available it will be equal to the address. Return NIL on failure. ")
353  { struct sockaddr_in sockname;  { struct sockaddr_in sockname;
354   int size = sizeof(struct sockaddr_in);   unsigned size = sizeof(struct sockaddr_in);
355   struct hostent *hostEntPtr;   struct hostent *hostEntPtr;
356   object address,host;   object address,host;
357    
# Line 635  getCharGclSocket(object strm, object blo Line 635  getCharGclSocket(object strm, object blo
635        if (high > 0)        if (high > 0)
636          { object bufp = SOCKET_STREAM_BUFFER(strm);          { object bufp = SOCKET_STREAM_BUFFER(strm);
637          int n;          int n;
638          n = SAFE_READ(fd,bufp->ust.ust_self ,bufp->ust.ust_dim);          n = SAFE_READ(fd,bufp->st.st_self ,bufp->ust.ust_dim);
639          doReverse(bufp->ust.ust_self,n);          doReverse(bufp->st.st_self,n);
640          bufp->ust.ust_fillp=n;          bufp->ust.ust_fillp=n;
641          if (n > 0)          if (n > 0)
642            {            {

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26