Choco OS
V.0.16.9.0
Join to the chocolate world
|
The file with interface of TCP module. More...
#include <oc_tcp.h>
#include <oc_module.h>
#include <oc_portman.h>
#include <oc_list.h>
#include <oc_mutex.h>
#include <oc_dynamic_config.h>
Go to the source code of this file.
Functions | |
static oC_Tcp_Server_t | GetServerWithConnection (oC_Tcp_Connection_t Connection) |
searches for a server that contains the given connection | |
static oC_Tcp_Server_t | GetServerCreatedBy (oC_Process_t Process) |
returns first server that has been created by the given process | |
static oC_Tcp_Connection_t | GetConnectionCreatedBy (oC_Process_t Process) |
returns first connection that has been created by the given process | |
static oC_ErrorCode_t | CloseServersCreatedBy (oC_Process_t Process, oC_Time_t Timeout) |
closes all servers that has been created by the given process | |
static oC_ErrorCode_t | CloseConnectionsCreatedBy (oC_Process_t Process, oC_Time_t Timeout) |
closes all connections that has been created by the given process | |
static | oC_List (oC_Tcp_Server_t) |
oC_ErrorCode_t | oC_Tcp_TurnOn (oC_Time_t Timeout) |
turns on TCP module More... | |
oC_ErrorCode_t | oC_Tcp_TurnOff (oC_Time_t Timeout) |
turns off TCP module More... | |
oC_ErrorCode_t | oC_Tcp_CloseProcess (oC_Process_t Process, oC_Time_t Timeout) |
closes all objects related with the process More... | |
oC_ErrorCode_t | oC_Tcp_ReservePort (oC_Tcp_Port_t *Port, oC_Time_t Timeout) |
reserves TCP port More... | |
oC_ErrorCode_t | oC_Tcp_ReleasePort (oC_Tcp_Port_t Port, oC_Time_t Timeout) |
releases TCP port More... | |
bool | oC_Tcp_IsPortReserved (oC_Tcp_Port_t Port) |
checks if the port is reserved | |
bool | oC_Tcp_IsPortReservedBy (oC_Tcp_Port_t Port, oC_Process_t Process) |
checks if the port is reserved by the given process | |
oC_ErrorCode_t | oC_Tcp_Connect (const oC_Net_Address_t *Destination, oC_Tcp_Port_t LocalPort, oC_Tcp_Connection_t *outConnection, oC_Time_t Timeout) |
connects to the remote TCP server More... | |
oC_ErrorCode_t | oC_Tcp_Disconnect (oC_Tcp_Connection_t *Connection, oC_Time_t Timeout) |
disconnects TCP connection More... | |
oC_ErrorCode_t | oC_Tcp_Listen (const oC_Net_Address_t *Source, oC_Tcp_Server_t *outServer, uint32_t MaxConnections, oC_Time_t Timeout) |
starts a server that listen at the given address More... | |
oC_ErrorCode_t | oC_Tcp_StopListen (oC_Tcp_Server_t *Server, oC_Time_t Timeout) |
stops listen at the given TCP port More... | |
oC_ErrorCode_t | oC_Tcp_Accept (oC_Tcp_Server_t Server, oC_Tcp_Connection_t *outConnection, oC_Time_t Timeout) |
waits for new connection and accepts it More... | |
oC_ErrorCode_t | oC_Tcp_Send (oC_Tcp_Connection_t Connection, const void *Buffer, oC_MemorySize_t Size, oC_Time_t Timeout) |
sends data by using TCP connection More... | |
oC_ErrorCode_t | oC_Tcp_Receive (oC_Tcp_Connection_t Connection, void *outBuffer, oC_MemorySize_t Size, oC_Time_t Timeout) |
receives data by using TCP connection More... | |
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Definition in file oc_tcp.c.
|
static |