Classes | |
| class | NetworkIpConnection |
| Bool WriteIpAddr | ( | const NetworkIpAddr & | addr, |
| HyperFile * | hf | ||
| ) |
| Bool ReadIpAddr | ( | NetworkIpAddr & | addr, |
| HyperFile * | hf | ||
| ) |
| Bool WriteIpAddrPort | ( | const NetworkIpAddrPort & | addr, |
| HyperFile * | hf | ||
| ) |
| Bool ReadIpAddrPort | ( | NetworkIpAddrPort & | addr, |
| HyperFile * | hf | ||
| ) |
| NetworkIpConnection* OpenOutgoing | ( | const NetworkIpAddrPort & | adr, |
| BaseThread * | thread = nullptr, |
||
| Int | connectTimeout = 30, |
||
| Int | sessionTimeout = 10, |
||
| Bool | useNagleAlgorithm = true, |
||
| Int * | error = nullptr |
||
| ) |
Opens a connection. Supports IPv4.
| [in] | adr | The destination address to connect to. |
| [in] | thread | The thread to use for the connection. The caller owns the pointed thread. |
| [in] | connectTimeout | The timeout in seconds for the initial connection. |
| [in] | sessionTimeout | The timeout in seconds for receive and send operations. |
| [in] | useNagleAlgorithm | Pass true to set the TCP/IP flag for TCP_NODELAY. For more information see http://msdn.microsoft.com/en-us/library/windows/desktop/ms740476(v=vs.85).aspx. |
| [in] | error | Assigned error status if the connection failed. A value different than 0 indicates failure. |
| NetworkIpConnection* OpenOutgoing | ( | const maxon::String & | adr, |
| BaseThread * | thread = nullptr, |
||
| Int | connectTimeout = 30, |
||
| Int | sessionTimeout = 10, |
||
| Bool | useNagleAlgorithm = true, |
||
| Int * | error = nullptr |
||
| ) |
Opens a connection. Supports IPv4.
| [in] | adr | The destination address to connect to (IPv4 address or host name). |
| [in] | thread | The thread to use for the connection. The caller owns the pointed thread. |
| [in] | connectTimeout | The timeout in seconds for the initial connection. |
| [in] | sessionTimeout | The timeout in seconds for receive and send operations. |
| [in] | useNagleAlgorithm | Pass true to set the TCP/IP flag for TCP_NODELAY. For more information see http://msdn.microsoft.com/en-us/library/windows/desktop/ms740476(v=vs.85).aspx. |
| [in] | error | Assigned error status if the connection failed. A value different than 0 indicates failure. |
| Int BytesInInputBuffer | ( | NetworkIpConnection * | ipc | ) |
Checks how many bytes are in the input buffer of an IP connection.
| [in] | ipc | The IP connection to check. The caller owns the pointed NetworkIpConnection. |
| Int RecvBytes | ( | NetworkIpConnection * | ipc, |
| void * | buf, | ||
| Int | size | ||
| ) |
Reads the bytes from the IP connection ipc to buf.
| [in] | ipc | The IP connection to read from. The caller owns the pointed NetworkIpConnection. |
| [in] | buf | The buffer to read to. The caller owns the pointed buffer. |
| [in] | size | The size of the buffer buf. |
| Int SendBytes | ( | NetworkIpConnection * | ipc, |
| const void * | buf, | ||
| Int | size | ||
| ) |
Sends the bytes from buf to the IP connection ipc.
| [in] | ipc | The IP connection to send the bytes to. The caller owns the pointed NetworkIpConnection. |
| [in] | buf | The buffer to send from. The caller owns the pointed buffer. |
| [in] | size | The size of the buffer buf. |
| NetworkIpConnection* OpenListener | ( | const NetworkIpAddrPort & | adr, |
| BaseThread * | thread, | ||
| Int | sessionTimeout, | ||
| Bool | dontwait, | ||
| Int * | error | ||
| ) |
Opens an IP listener.
| [in] | adr | The IP address of the network interface to use for the listener. |
| [in] | thread | The thread to use for the connection. The caller owns the pointed thread. |
| [in] | sessionTimeout | The time after which the listener closes an unresponsive connection. |
| [in] | dontwait | Pass true to set the TCP/IP flag for TCP_NODELAY. For more information see http://msdn.microsoft.com/en-us/library/windows/desktop/ms740476(v=vs.85).aspx. |
| [in] | error | Assigned error status if the connection failed. A value different than 0 indicates failure. |
| NetworkIpConnection* OpenListener | ( | const maxon::String & | adr, |
| BaseThread * | thread, | ||
| Int | sessionTimeout, | ||
| Bool | useNagleAlgorithm, | ||
| Int * | error | ||
| ) |
Opens an IP listener.
| [in] | adr | The IP address of the network interface to use for the listener. |
| [in] | thread | The thread to use for the connection. The caller owns the pointed thread. |
| [in] | sessionTimeout | The time after which the listener closes an unresponsive connection. |
| [in] | useNagleAlgorithm | Pass true to set the TCP/IP flag for TCP_NODELAY. For more information see http://msdn.microsoft.com/en-us/library/windows/desktop/ms740476(v=vs.85).aspx. |
| [in] | error | Assigned error status if the connection failed. A value different than 0 indicates failure. |
| NetworkIpConnection* OpenWaitForIncoming | ( | NetworkIpConnection * | listener, |
| BaseThread * | connection, | ||
| Int * | error | ||
| ) |
Waits for an incoming connection to listener.
| [in] | listener | The listener IP connection to wait for. Needs to be freed with GeIpCloseConnection(). The caller owns the pointed NetworkIpConnection. |
| [in] | connection | The thread to use for the connection. The caller owns the pointed thread. |
| [in] | error | Assigned error status if the connection failed. A value different than 0 indicates failure. |
| void KillConnection | ( | NetworkIpConnection *& | ipc | ) |
Kills an IP connection.
| [in] | ipc | The IP connection to kill. The caller owns the pointed NetworkIpConnection. |
| void CloseConnection | ( | NetworkIpConnection *& | ipc | ) |
Closes and frees an IP connection.
| [in] | ipc | The IP connection to close. Assigned nullptr afterward. The caller owns the pointed NetworkIpConnection. |