SCOUG-Programming Mailing List Archives
Return to [ 29 |
May |
1998 ]
<< Previous Message <<
Content Type: text/plain
Content-Transfer-Encoding: 7bit
-----BEGIN PGP SIGNED MESSAGE-----
Here is a simple example of a C program for client side socket
programming. It sends a request to a Web server to determine the
supported HTTP command options. A server running the HTTP/1.1 protocol
will return the options. A server running the HTTP/1.0 protocol should
return an error.
If you run the program to talk to www.possi.org, you should get back
the options supported by that server. If you run the program to talk
to www.scoug.com, you will see that earlier versions of Apache sticks
to the HTTP/1.0 protocol.
I used the Gnu/EMX complier to compile the program. Be sure to
include the socket library at the end of your compile command:
- -lsocket.
===============================================================
Gregory W. Smith (WD9GAY) gsmith@well.com
finger gsmith@well.com for PGP public key
-----BEGIN PGP SIGNATURE-----
Version: 2.6.2
iQCVAwUBNW8w5DtML4mvizAhAQEu1AP+NjeKdUXdmEywVAjy0pI0n2XBrIRzEpGH
/ecJbRTm372ck70AOcVDs1+uKBUvq8bEleN6t5Nw0WLY7Tex5GU7F6MLf3S9pJ3M
3plIbYn/gTqyExWEyUZITvS3cWR1uRWIXw8iwa653CG+g9dzQO8nIYldlMiseVSG
gayj0xBZHuY=
=MLaO
-----END PGP SIGNATURE-----
Content Type: application/octet-stream
File attachment:
client.c
Content Type: application/octet-stream
File attachment:
client.asc
<< Previous Message <<
Return to [ 29 |
May |
1998 ]
The Southern California OS/2 User Group
P.O. Box 26904
Santa Ana, CA 92799-6904, USA
Copyright 2001 the Southern California OS/2 User Group. ALL RIGHTS
RESERVED.
SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group.
OS/2, Workplace Shell, and IBM are registered trademarks of International
Business Machines Corporation.
All other trademarks remain the property of their respective owners.
|