10 #ifndef K_API_TCP_CLIENT_H
11 #define K_API_TCP_CLIENT_H
14 #include <kApi/Io/kTcpClient.x.h>
kStatus kTcpClient_SetWriteBuffers(kTcpClient client, kSSize socketSize, kSSize clientSize)
Sets the size of write buffers.
Represents a 32-bit unsigned integer.
Represents a 64-bit unsigned integer.
Represents an Internet Protocol version.
Represents a void pointer.
kStatus kTcpClient_Connect(kTcpClient client, kIpAddress address, k32u port, k64u timeout)
Connects to a remote end point.
kStatus kTcpClient_Status(kTcpClient client)
Reports any internal errors that will prevent success of future communication attempts.
kStatus kTcpClient_LocalEndPoint(kTcpClient client, kIpEndPoint *endPoint)
Returns the local end point for a connected client.
Represents an unsigned integer that can store a pointer address.
Abstract base class for memory allocator types.
kStatus kTcpClient_Construct(kTcpClient *client, kIpVersion ipVersion, kAlloc allocator)
Constructs a TCP client object.
Represents an IP address.
Definition: kNetwork.h:37
Represents a signed integer that can store a pointer address.
kStatus kTcpClient_BeginConnect(kTcpClient client, kIpAddress address, k32u port)
Begins connecting to a remote end point.
kStatus kTcpClient_SetCancelHandler(kTcpClient client, kCallbackFx function, kPointer receiver)
Sets a cancel query handler, which can be used to asynchronously terminate read/write operations...
kStatus kTcpClient_Shutdown(kTcpClient client)
Begins shutdown of communication.
kStatus kTcpClient_Wait(kTcpClient client, k64u timeout)
Waits until the client has bytes to read or until the specified timeout period elapses.
kSize kTcpClient_Available(kTcpClient client)
Returns the number of bytes currently enqueued and available for reading.
kStatus(kCall * kCallbackFx)(kPointer receiver, kPointer sender, void *args)
Callback signature for a generic event handler.
Definition: kApiDef.h:1806
kStatus kTcpClient_EndConnect(kTcpClient client, k64u timeout)
Completes a connection operation that was started with kTcpClient_BeginConnect.
kStatus kTcpClient_SetReadBuffers(kTcpClient client, kSSize socketSize, kSSize clientSize)
Sets the size of read buffers.
kStatus kTcpClient_RemoteEndPoint(kTcpClient client, kIpEndPoint *endPoint)
Returns the remote end point for a connected client.
IP networking definitions.
Represents an error code.
Represents an IP end point (address, port).
Definition: kNetwork.h:199
kStatus kTcpClient_Cancel(kTcpClient client)
Cancels any pending I/O operations.
kStatus kTcpClient_EnableSeek(kTcpClient client, kBool enabled)
Enables limited support for forward/reverse seek operations.
kSocket kTcpClient_Socket(kTcpClient client)
Returns the underlying kSocket object.
kStatus kTcpClient_SetWriteTimeout(kTcpClient client, k64u timeout)
Sets the timeout duration for write operations.
kStatus kTcpClient_SetNoDelay(kTcpClient client, kBool noDelay)
Can be used to disable the Nagle algorithm.
Represents a network socket.
Represents a boolean value.
kStatus kTcpClient_SetReadTimeout(kTcpClient client, k64u timeout)
Sets the timeout duration for read operations.