program Test_TCP_Server;
import "net.dll"
PRIVATE
	check,c2=-1;
begin
	full_screen=false;
 	net_init();
 	net_resolvehost(0,0,16660); // El host es 0 pq es para server
 	net_tcp_open(0);
  	write(0,10,10,3,"Server");
  	write_int(0,200,110,3,&check);
  	
  	repeat
		c2=net_tcp_accept(0);
    		frame;
  	until(key(_esc) || c2==0)
  	repeat
  		c2=net_tcp_recv(0,&check,4);
  		frame;
  	until(key(_esc) || c2==4)
	repeat	
		frame;
 	 until(key(_esc))
 	net_tcp_close(0);
  	net_quit();
end
