Changeset 3757 in Sophya for trunk/AddOn/TAcq/swrapsock.h


Ignore:
Timestamp:
Apr 30, 2010, 12:54:25 AM (15 years ago)
Author:
ansari
Message:

Ajout classes de transfert DMA vers Ethernet et lecture ethernet, Reza 29/04/2010

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/AddOn/TAcq/swrapsock.h

    r3542 r3757  
    3636public:
    3737  Socket(int s=-1);
    38   //  Socket(Socket const & a);
     38  Socket(Socket const & a);
    3939  ~Socket();
    4040
     
    4242  size_t Receive(char * buff, size_t len, int flag=0);
    4343  int Close();
     44 
     45  inline Socket& operator=(Socket const & a)
     46  { Set(a);  return (*this); }
     47
    4448  inline int SetPrtLevel(int lev=0)
    4549    { if (lev > 0) prtlev = lev; return prtlev; }
     50  inline long NBytesSent() { return totsnd; }
     51  inline long NBytesRecv() { return totrcv; }
     52 
     53protected:
     54  void Set(Socket const & a);
    4655
    47 protected:
    48  
    4956  int skt;
    5057  long tstart;    /*  Temps de demarrage en sec  */
     
    8996  ClientSocket(string const& srvname, int port);
    9097  ClientSocket(const char* srvname, int port);
     98  ClientSocket(ClientSocket const& a);
     99  inline ClientSocket& operator=(ClientSocket const& a)
     100  { SetC(a);  return (*this); }
    91101protected:
     102  void SetC(ClientSocket const& a);
    92103  void InitConnection(const char* srvname, int port);
     104
    93105  int portid;
    94106  struct sockaddr_in  ipskt;
Note: See TracChangeset for help on using the changeset viewer.