Zen API

- Home
- Topics
- Types
- Files

All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
Public Member Functions
kSocket Class Reference
kApi/Io

## Description

Represents a network socket.

Inheritance diagram for kSocket:

## Public Member Functions
kStatus | kSocket_Accept (kSocket socket, kSocket *connection, kAlloc allocator)
| Blocks until an incoming connection request is accepted. More...
kStatus | kSocket_BeginConnect (kSocket socket, kIpAddress address, k32u port)
| Begins connecting the socket to a remote end point. More...
kStatus | kSocket_Bind (kSocket socket, kIpAddress address, k32u port)
| Binds the socket to a local IP address and/or port. More...
kStatus | kSocket_BindToDevice (kSocket socket, const kChar *interfaceName)
| Binds the socket to a specific network interface. More...
kStatus | kSocket_Connect (kSocket socket, kIpAddress address, k32u port, k64u timeout)
| Connects the socket to a remote end point. More...
kStatus | kSocket_Construct (kSocket *socket, kIpVersion ipVersion, kSocketType socketType, kAlloc allocator)
| Constructs a kSocket object. More...
kStatus | kSocket_EnableBroadcast (kSocket socket, kBool broadcast)
| Enables or disables datagram broadcasting. More...
kStatus | kSocket_EnableReuseAddress (kSocket socket, kBool reuse)
| Enables or disables reuse of a local end point within a short period of time. More...
kStatus | kSocket_EndConnect (kSocket socket, k64u timeout)
| Completes a connection operation that was started with kSocket_BeginConnect. More...
kSocketEvent | kSocket_Events (kSocket socket)
| Gets the events detected during the most recent wait operation. More...
kStatus | kSocket_Listen (kSocket socket, kSize backlog)
| Places the socket into a listening state, to monitor for incoming connection requests. More...
kStatus | kSocket_LocalEndPoint (kSocket socket, kIpEndPoint *endPoint)
| Returns the local end point for a bound socket. More...
kStatus | kSocket_Read (kSocket socket, void *buffer, kSize size, kSize *read)
| Reads one or more bytes. More...
kStatus | kSocket_ReadFrom (kSocket socket, kIpEndPoint *endPoint, void *buffer, kSize size, kSize *read)
| Reads a datagram. More...
kStatus | kSocket_RemoteEndPoint (kSocket socket, kIpEndPoint *endPoint)
| Returns the remote end point for a connected socket. More...
kStatus | kSocket_SetBlocking (kSocket socket, kBool isBlocking)
| Determines whether the socket will block on read/write requests. More...
kStatus | kSocket_SetEvents (kSocket socket, kSocketEvent events)
| Sets the event types that a socket will wait on. More...
kStatus | kSocket_SetLingerTime (kSocket socket, k64u lingerTime)
| Specifies the duration that a TCP connection can remain open when the socket is closed in order to ensure that all outbound bytes are transmitted to the receiver. More...
kStatus | kSocket_SetNoDelay (kSocket socket, kBool noDelay)
| Can be used to disable the Nagle algorithm. More...
kStatus | kSocket_SetReadBuffer (kSocket socket, kSize size)
| Sets the size of the read buffer used by the underlying operating system. More...
kStatus | kSocket_SetReadTimeout (kSocket socket, k64u timeout)
| Sets the timeout duration for blocking read operations. More...
kStatus | kSocket_SetWriteBuffer (kSocket socket, kSize size)
| Sets the size of the write buffer used by the underlying operating system. More...
kStatus | kSocket_SetWriteTimeout (kSocket socket, k64u timeout)
| Sets the timeout duration for blocking write operations. More...
kStatus | kSocket_Shutdown (kSocket socket)
| Begins shutdown of socket communication. More...
kStatus | kSocket_Status (kSocket socket)
| Reports any internal errors that will prevent success of future communication attempts. More...
kStatus | kSocket_Wait (kSocket socket, k64u timeout)
| Waits for a socket event. More...
kStatus | kSocket_WaitAny (const kSocket *sockets, kSize count, k64u timeout)
| Waits until an event occurs on one or more sockets. More...
kStatus | kSocket_Write (kSocket socket, const void *buffer, kSize size, kSize *written)
| Writes one or more bytes. More...
kStatus | kSocket_WriteTo (kSocket socket, kIpAddress address, k32u port, const void *buffer, kSize size)
| Sends a datagram. More...
Public Member Functions inherited from kObject
kAlloc | kObject_Alloc (kObject object)
| Gets the memory allocator associated with this object. More...
kStatus | kObject_Clone (kObject *object, kObject source, kAlloc allocator)
| Constructs a new object by copying an existing object, including any aggregated child elements. More...
kStatus | kObject_Destroy (kObject object)
| Destroys the object. More...
kStatus | kObject_Dispose (kObject object)
| Destroys the object and any aggregated child elements. More...
kBool | kObject_Equals (kObject object, kObject other)
| Determines whether the object is equal to another object. More...
kSize | kObject_HashCode (kObject object)
| Gets a hash code representing the state of this object. More...
kBool | kObject_Is (kObject object, kType type)
| Determines whether this object is an instance of the specified type. More...
kBool | kObject_IsShared (kObject object)
| Reports whether the object is currently shared (reference count greater than one). More...
kStatus | kObject_SetPool (kObject object, kObjectPool pool)
| Sets the object pool associated with this object. More...
kStatus | kObject_Share (kObject object)
| Increments the reference count associated with this object. More...
kSize | kObject_Size (kObject object)
| Estimates the memory consumed by this object, including any aggregated child elements. More...
kType | kObject_Type (kObject object)
| Returns the type of the object. More...

## Additional Inherited Members
Related inherited from kObject
#define | kObject_Type_(OBJ) kxObject_Type_(OBJ)
| Macro version of kObject_Type.
#define | kObject_Is_(OBJ, TYPE) kxObject_Is_(OBJ, TYPE)
| Macro version of kObject_Is.
#define | kObject_Alloc_(OBJ) kxObject_Allocator_(OBJ)
| Macro version of kObject_Alloc.

The documentation for this class was generated from the following file:

- Io/kSocket.h