vsisocket.h File Reference

#include "vsitypesint.h"

Go to the source code of this file.

Data Structures

struct  vsiIPaddress
class  CvsiUDPsocket
class  CvsiTCPsocket
class  CvsiTCPwait

Typedefs

typedef struct vsiIPaddress vsiIPaddress

Functions

u32 vsiGetIPaddress (char *HostName)

Variables

const u32 VSI_SOCKET_UNDEFINED_IP_ADDRESS = 0

Typedef Documentation

typedef struct vsiIPaddress vsiIPaddress

Function Documentation

u32 vsiGetIPaddress ( char *  HostName  ) 

Definition at line 532 of file vsisocket.cpp.

00533 {
00534     struct hostent* hostaddress;
00535     hostaddress = gethostbyname(HostName);
00536 
00537     if(hostaddress == 0)
00538     {
00539         return 0;
00540     }
00541 
00542     u32 result;
00543 
00544     struct sockaddr_in RemoteAddress;
00545     memset( &RemoteAddress,0x00,sizeof( RemoteAddress ) );
00546     memcpy ((char*)&RemoteAddress.sin_addr,
00547             hostaddress->h_addr_list[0],
00548             hostaddress->h_length);
00549 
00550     result = RemoteAddress.sin_addr.s_addr;
00551 
00552     return result;
00553 }


Variable Documentation

Definition at line 28 of file vsisocket.h.

Generated on Wed Jul 4 16:03:30 2012 for RIO by  doxygen 1.6.3