PacketWriter.cpp
changeset 4 fdf04a93faeb
parent 3 724e07a9f155
child 8 6097dc1fe2cf
equal deleted inserted replaced
3:724e07a9f155 4:fdf04a93faeb
     9 extern "C" {
     9 extern "C" {
    10 #include <sys/socket.h>
    10 #include <sys/socket.h>
    11 #include <netinet/in.h>
    11 #include <netinet/in.h>
    12 #include <arpa/inet.h>
    12 #include <arpa/inet.h>
    13 #include <netdb.h>
    13 #include <netdb.h>
    14 } PacketWriter::PacketWriter (char *hostname, int port)
    14 };
       
    15 
       
    16 PacketWriter::PacketWriter (char *hostname, int port)
    15 {
    17 {
    16     unsigned int size;
    18     unsigned int size;
    17     unsigned int fd;
    19     unsigned int fd;
    18     struct hostent *host = gethostbyname (hostname);
    20     struct hostent *host = gethostbyname (hostname);
    19 
    21