| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | TCP/IP in OS/2? |
Hallo, Eric! *** Am Montag 22. April 1996 um 02:15 schrieb Eric Theriault an All: ET> Does anyone have any information on programming TCP/IP sockets under OS/2 ET> using EMX? Thanks. This is a simple WWW client which does _not_ render output. I use it for testing my WWW server (Magic TSWWW or homepage at http://www.uni-giessen.de/~g087/os2dev.html). Note that a lot of subroutines in IBM's implementation of sockets are not reentrant, so they may not be used in multithreaded programs without serialization. This includes nearly all the get* functions. === Cut === #include #include #include "www.h" static int crlf=FALSE; static int sock=-1; static int debug=FALSE; void finish(void) { if (sock>=0) { /* shutdown(sock,2); */ close(sock); } exit(0); } void sigpipe(int sig) { puts("The server has closed the connection."); finish(); } int rh(int handle, char *buf, int size) { return read(handle,buf,size); } int wh(int handle, char *buf, int size) { char *c; int l=1,save=size; c=buf; while (l>0 && size--) { if (*c=='\n') write(handle,"\r",1); l=write(handle,c++,1); } if (l<0) return l; return save; } int transact(int r, int w, char *buf, int s, FILE *ofile) { static int doit=FALSE; char *chk; int i; do { i=rh(r,buf,s); if (debug && i>0) fprintf(stderr,"Read % 5d byte from %d\n",i,r); if (i>0) { if (ofile) { if (doit) { if (debug) fprintf(stderr,"Write % 5d byte to output file\n", i); fwrite(buf,i,1,ofile); } else { chk=buf+3; while (chk* Origin: Die TeX-Box +49-6034-1455 V.34 -930022 ISDN 24h (2:244/1130.42) SEEN-BY: 50/99 270/101 620/243 711/401 409 410 413 430 808 809 934 955 SEEN-BY: 712/407 515 517 628 713/888 800/1 @PATH: 244/1130 24/999 888 396/1 270/101 712/515 711/808 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.