ROOT logo
// $Id: UdpPacketTcpClient.h 2721 2012-04-07 05:53:09Z matevz $

// Copyright (C) 1999-2008, Matevz Tadel. All rights reserved.
// This file is part of GLED, released under GNU General Public License version 2.
// For the licensing terms see $GLEDSYS/LICENSE or http://www.gnu.org/.

#ifndef Net1_UdpPacketTcpClient_H
#define Net1_UdpPacketTcpClient_H

#include "Glasses/UdpPacketSource.h"

class GThread;
class SSocket;


class UdpPacketTcpClient : public UdpPacketSource
{
  MAC_RNR_FRIENDS(UdpPacketTcpClient);

private:
  void _init();

protected:
  TString           mHost; // X{GS} 7 Textor()
  UShort_t          mPort; // X{GS} 7 Value(-range=>[0,65535,1])

  UInt_t            mNRetry;       // X{GS} 7 Value(-range=>[0, 10000]);
  UInt_t            mRetryWaitSec; // X{GS} 7 Value(-range=>[0, 10000]);
  Bool_t            bExitOnFailure;// X{GS} 7 Bool()

  SSocket          *mSocket;         //!
  GThread          *mListenerThread; //!

  static void* tl_ListenLoop(UdpPacketTcpClient* c);
  void ListenLoop();

public:
  UdpPacketTcpClient(const Text_t* n="UdpPacketTcpClient", const Text_t* t=0);
  virtual ~UdpPacketTcpClient();

  void ConnectAndListenLoop(); // X{Ed} 7 MButt()
  void StopListening(Bool_t close_p=true);        // X{Ed} 7 MCWButt()

  void SendMessage(); // X{Ed} 7 MButt()

#include "UdpPacketTcpClient.h7"
  ClassDef(UdpPacketTcpClient, 1);
}; // endclass UdpPacketTcpClient

#endif
 UdpPacketTcpClient.h:1
 UdpPacketTcpClient.h:2
 UdpPacketTcpClient.h:3
 UdpPacketTcpClient.h:4
 UdpPacketTcpClient.h:5
 UdpPacketTcpClient.h:6
 UdpPacketTcpClient.h:7
 UdpPacketTcpClient.h:8
 UdpPacketTcpClient.h:9
 UdpPacketTcpClient.h:10
 UdpPacketTcpClient.h:11
 UdpPacketTcpClient.h:12
 UdpPacketTcpClient.h:13
 UdpPacketTcpClient.h:14
 UdpPacketTcpClient.h:15
 UdpPacketTcpClient.h:16
 UdpPacketTcpClient.h:17
 UdpPacketTcpClient.h:18
 UdpPacketTcpClient.h:19
 UdpPacketTcpClient.h:20
 UdpPacketTcpClient.h:21
 UdpPacketTcpClient.h:22
 UdpPacketTcpClient.h:23
 UdpPacketTcpClient.h:24
 UdpPacketTcpClient.h:25
 UdpPacketTcpClient.h:26
 UdpPacketTcpClient.h:27
 UdpPacketTcpClient.h:28
 UdpPacketTcpClient.h:29
 UdpPacketTcpClient.h:30
 UdpPacketTcpClient.h:31
 UdpPacketTcpClient.h:32
 UdpPacketTcpClient.h:33
 UdpPacketTcpClient.h:34
 UdpPacketTcpClient.h:35
 UdpPacketTcpClient.h:36
 UdpPacketTcpClient.h:37
 UdpPacketTcpClient.h:38
 UdpPacketTcpClient.h:39
 UdpPacketTcpClient.h:40
 UdpPacketTcpClient.h:41
 UdpPacketTcpClient.h:42
 UdpPacketTcpClient.h:43
 UdpPacketTcpClient.h:44
 UdpPacketTcpClient.h:45
 UdpPacketTcpClient.h:46
 UdpPacketTcpClient.h:47
 UdpPacketTcpClient.h:48
 UdpPacketTcpClient.h:49
 UdpPacketTcpClient.h:50