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_EnablePacketInfo (kSocket socket, kBool enabled)
| Enables or disables interface index information for datagrams. 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...
kSize | kSocket_Handle (kSocket socket)
| Provides access to the underlying O/S socket handle. More...
kStatus | kSocket_JoinMulticastGroup (kSocket socket, kIpAddress group, kIpAddress iface)
| Joins the specified multicast group on the specified interface. More...
kStatus | kSocket_LeaveMulticastGroup (kSocket socket, kIpAddress group, kIpAddress iface)
| Leaves the specified multicast group on the specified interface. 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_ReadFromEx (kSocket socket, kIpEndPoint *endPoint, kSize *adapterId, void *buffer, kSize size, kSize *read)
| Reads a datagram and associated metadata. 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...
kBool | kObject_HasForeignData (kObject object)
| Reports whether the object, including aggregated child elements, contains any foreign memory references. 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
Protected Member Functions inherited from kObject
kStatus | kObject_FreeMem (kObject object, void *mem)
| Protected method called by derived classes to free memory using the object's allocator. More...
kStatus | kObject_FreeMemRef (kObject object, void *mem)
| Protected method called by derived classes to free memory (and reset the provided memory pointer to kNULL) using the object's allocator. More...
kStatus | kObject_GetMem (kObject object, kSize size, void *mem)
| Protected method called by derived classes to allocate memory using the object's allocator. More...
kStatus | kObject_GetMemZero (kObject object, kSize size, void *mem)
| Protected method called by derived classes to allocate and zero memory using the object's allocator. More...
kStatus | kObject_Init (kObject object, kType type, kAlloc alloc)
| Protected method called by derived classes to initialize the kObject base class. More...
kStatus | kObject_VDisposeItems (kObject object)
| Protected virtual method that destroys any aggregated child objects associated with a collection. More...
kBool | kObject_VEquals (kObject object, kObject other)
| Protected virtual method that compares two objects for equality. More...
kBool | kObject_VHasForeignData (kObject object)
| Protected virtual method that reports whether the object, including aggregated child elements, contains any foreign memory references. More...
kSize | kObject_VHashCode (kObject object)
| Protected virtual method that calculates a hash code representing the object instance. More...
kStatus | kObject_VInitClone (kObject object, kObject source, kAlloc allocator)
| Protected virtual method that clones (makes a deep copy of) the specified source object. More...
kStatus | kObject_VRelease (kObject object)
| Protected virtual method that deallocates any resources owned by the object. More...
kSize | kObject_VSize (kObject object)
| Protected virtual method that calculates the total size (in bytes) of the object instance. More...

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

- Io/kSocket.h