Socket_TCP

from panda3d.net import Socket_TCP
class Socket_TCP

Bases: Socket_IP

Base functionality for a TCP connected socket This class is pretty useless by itself but it does hide some of the platform differences from machine to machine

Inheritance diagram

Inheritance diagram of Socket_TCP

ActiveOpen()

C++ Interface: ActiveOpen(const Socket_TCP self, const Socket_Address theaddress, bool setdelay)

// inline bool ActiveOpen(const Socket_Address &theaddress);

/**
  • This function will try and set the socket up for active open to a specified

  • address and port provided by the input parameter

*/

ActiveOpenNonBlocking()

C++ Interface: ActiveOpenNonBlocking(const Socket_TCP self, const Socket_Address theaddress)

/**
  • This function will try and set the socket up for active open to a specified

  • address and port provided by the input parameter (non-blocking version)

*/

DontLinger()

C++ Interface: DontLinger(const Socket_TCP self)

/**
  • Turn off the linger flag. The socket will quickly release buffered items

  • and free up OS resources. You may lose a stream if you use this flag and

  • do not negotiate the close at the application layer.

*/

ErrorIsWouldBlocking()

C++ Interface: ErrorIs_WouldBlocking(const Socket_TCP self, int err)

ErrorIs_WouldBlocking()

C++ Interface: ErrorIs_WouldBlocking(const Socket_TCP self, int err)

RecvData()

C++ Interface: RecvData(const Socket_TCP self, int max_len)

/**
  • Read the data from the connection - if error 0 if socket closed for read or

  • length is 0 + bytes read ( May be smaller than requested)

*/

/**
  • Read the data from the connection - if error 0 if socket closed for read or

  • length is 0 + bytes read (May be smaller than requested)

*/

SendData()

C++ Interface: SendData(const Socket_TCP self, bytes data)

/**
  • Ok Lets Send the Data - if error 0 if socket closed for write or lengh is 0

    • bytes writen ( May be smaller than requested)

*/

SetLinger()

C++ Interface: SetLinger(const Socket_TCP self, int interval_seconds)

/**
  • will control the behavior of SO_LINGER for a TCP socket

*/

SetNoDelay()

C++ Interface: SetNoDelay(const Socket_TCP self, bool flag)

/**
  • Disable Nagle algorithm. Don’t delay send to coalesce packets

*/

SetSendBufferSize()

C++ Interface: SetSendBufferSize(const Socket_TCP self, int insize)

/**
  • Just like it sounds. Sets a buffered socket recv buffer size. This

  • function does not refuse ranges outside hard-coded OS limits

*/

ShutdownSend()

C++ Interface: ShutdownSend(const Socket_TCP self)

__init__(*args, **kwargs)
getClassType()

C++ Interface: get_class_type()

get_class_type()

C++ Interface: get_class_type()