#include "tcpip.h"
#include "../gobj/errors.h"
#include "../gobj/threads.h"
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
Defines | |
| #define | GJ_IFACE_TCPIP_STDPORT 2345 |
| Standard gobj tcpip port. | |
| #define | MAXCONNS 10 |
| Maximal incoming connection count. | |
Functions | |
| Gj_IfacePort* | Gj_iface_tcpip_openPort (Gj_Ctx* ctx, Gj_Iface* iface, char* addr) |
| Open a port. More... | |
| int | Gj_iface_tcpip_closePort (Gj_Ctx* ctx, Gj_Iface* iface, Gj_IfacePort* port) |
| Close the given port. More... | |
| int | Gj_iface_tcpip_write (Gj_Ctx* ctx, Gj_Iface* iface, Gj_IfacePort* port, void* ptr, int size) |
| Write data to the port. More... | |
| int | Gj_iface_tcpip_read (Gj_Ctx* ctx, Gj_Iface* iface, Gj_IfacePort* port, void* ptr, int size) |
| Read data from the port. More... | |
| int | Gj_iface_tcpip_read2write (Gj_Ctx* ctx, Gj_Iface* iface, Gj_IfacePort* port) |
| Change from read to write mode. More... | |
| int | Gj_iface_tcpip_write2read (Gj_Ctx* ctx, Gj_Iface* iface, Gj_IfacePort* port) |
| Change from write to read mode . More... | |
| int | Gj_iface_tcpip_flush (Gj_Ctx* ctx, Gj_Iface* iface, Gj_IfacePort* port) |
| Flush IO buffers. More... | |
| int | Gj_iface_tcpip_listen (Gj_Ctx* ctx, Gj_Iface* iface) |
| Listen on the interface. More... | |
|
|
Open a port.
|
|
|
Close the given port.
|
|
|
Write data to the port.
|
|
|
Read data from the port.
|
|
|
Change from read to write mode.
|
|
|
Change from write to read mode .
|
|
|
Flush IO buffers.
|
|
|
Listen on the interface.
Listen on the interface until an incoming connection request arrives, establish that connection and fork to
|
1.2.1 written by Dimitri van Heesch,
© 1997-2000