aboutsummaryrefslogtreecommitdiff
path: root/Linux_C_12/cTCP_121.c
diff options
context:
space:
mode:
authorCamil Staps2015-08-20 10:48:30 +0200
committerCamil Staps2015-08-20 10:55:53 +0200
commit792a1c8d8dc0cb576164da7cefaea4f43a95a1c2 (patch)
treef70167923f87c559c77f3ef6e05e7ca19034e5ca /Linux_C_12/cTCP_121.c
parentTo mimic the Windows library, WinGetTime now returns the local time rather th... (diff)
Typedefs, comments, etc. Not compiling yet.tcp
Diffstat (limited to 'Linux_C_12/cTCP_121.c')
-rw-r--r--Linux_C_12/cTCP_121.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/Linux_C_12/cTCP_121.c b/Linux_C_12/cTCP_121.c
index 0e8486e..a8c6ebd 100644
--- a/Linux_C_12/cTCP_121.c
+++ b/Linux_C_12/cTCP_121.c
@@ -1,16 +1,20 @@
/********************************************************************************************
- Clean OS Windows library module version 1.2.1.
+ Clean OS Linux library module version 1.2.1.
This module is part of the Clean Object I/O library, version 1.2.1,
- for the Windows platform.
+ for the Linux platform.
********************************************************************************************/
/********************************************************************************************
About this module:
- Routines related to printing.
+ Routines related to TCP.
********************************************************************************************/
//#define FD_SETSIZE "maximal number of sockets to select on" (default is 64)
-#include <winsock.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <stdio.h>
#include "util_121.h"
#include "Clean.h"
#include "cTCP_121.h"
@@ -153,7 +157,7 @@ int os_disconnected(SOCKET endpointRef)
int os_connectrequestavailable(SOCKET endpointRef)
{
FD_SET readSet;
- TIMEVAL timeout;
+ struct timeval timeout;
int nr;
printf("os_connectrequestavailable\n");
@@ -409,7 +413,7 @@ void os_connectTCPC(int onlyForMac, int block, int doTimeout, unsigned int stopT
else
{
FD_SET writeSet, exptnSet;
- TIMEVAL timeout;
+ struct timeval timeout;
unsigned int now;
int noOfWritableSockets, timeoutTicks;
FD_ZERO(&writeSet);
@@ -626,7 +630,7 @@ void selectChC( int justForMac, int nonBlocking, int doTimeout, unsigned int sto
{
int nRChannels, nSChannels, i;
FD_SET *pReadSet, *pWriteSet;
- TIMEVAL timeout;
+ struct timeval timeout;
unsigned int now;
int n, timeoutTicks;
printf("selectChC\n");