Easy Socket libraryVersion: Easy Socket 0.1License: LGPL2 (see LICENSE) © 1999-2000, Erich Roncarolo
Bugs, contributes, mailing list and other informations at: Project administrator has changed: now mail to Karl T. Cooper
for any question.
|
||||
|
--- Installation instruction ---To compile library:# makeTo run the first test: # make testTo compile and link a program that depends from this library: # gcc -I/path/to/dir/that/contains/easy_sock.h -I- -L/path/to/dir/that/contains/libeasy_sock.a -leasy_sock -o program program.cTo run program just linked you should add the directory: /path/to/dir/that/contains/libeasy_sock.so to LD_LIBRARY_PATH, than you can execute it. This way doesn't work if your program is setuid/setgid binary (LD_LIBRARY_PATH is ignored). Another way is to copy (or to link) libeasy_sock.so in /lib or /usr/lib. To compile and statically link a program that uses this library: # gcc -I/path/to/dir/that/contains/easy_sock.h -I- -static /path/to/easy_sock.o -o program program.cIf you want to link this library with your program, but you don't want statically link other libraries, you should compile it like this: # gcc -I/path/to/dir/that/contains/easy_sock.h -I- /path/to/easy_sock.o -o program program.c
--- Test ---There are 3 program to test library:
To compile and run server, simply type: # make serverTo compile and run client, type: # make clientServer usage: easy_server [host port]It bind host:port and wait for connections. When accept a connection it read a command, then execute it. Two command are available: <x> read <type> <var> <x>Where: <x> can be '-' or 'c': first one tell to server to use normal functions, and second one tell to use 'chars' functions.Only MAX_VARS (actually 100) variables for each type can be written. Client usage: easy_client [host port] <x> <read|write> <type> <var> [value]It works like server. The library is linked with the program, so you can use it directly, without change libraries path. Obviously it needs easy_server.
--- PHP3 ---There are a PHP3 Easy Socket version: this includes the library file (easy_sock.php3) and a test file (easy_client.php3).You can use it with Apache if the PHP3 module is installed; just load the following URL in your favourite browser: http://localhost/path/to/Easy/Socket/library/easy_client.php3It needs easy_server to work.
--- Tunnel ---In library is included an example of applicaction called "tunnel".It binds an host:port pair and create a tunnel that links it with another host:port pair. Compilation: # make tunnelUsage: tunnel host1 port1 host2 port2Like the easy_client, the library is linked with the program.
Have a lot of fun!
|
|||
|