Initial revision.

This commit is contained in:
curt
2000-10-04 21:55:11 +00:00
parent 5702bd7ee8
commit 1e60698053

21
simgear/io/socktest.cxx Normal file
View File

@@ -0,0 +1,21 @@
#include <unistd.h>
#include "sg_socket.hxx"
int main() {
SGSocket s( "", "5500", "tcp" );
if ( !s.open( SG_IO_BI ) ) {
cout << "error can't open socket\n";
}
char buf[256];
while ( true ) {
if ( s.readline( buf, 256 ) > 0 ) {
cout << "result = " << buf;
}
sleep(1);
}
}