program Test_UDP_Server;

type _IPaddress
    int host;
    word port;
end

type _UDPpacket
    int channel;       
    byte pointer data;
    int len;
    int maxlen;
    int status;
    _IPaddress address;
end

import "net.dll"
PRIVATE
	_UDPpacket pointer p;
begin
	full_screen=false;
 	net_init();
	net_udp_allocpacket(0,4);
	p=net_udp_getpacket(0);
	net_udp_open(0,16660);

 	write(0,10,10,3,"Server");
  	write_int(0,100,110,3,p.data);
  	
 	repeat
 		net_udp_recv(0,0);
		frame;
 	until(key(_esc))
 	
 	net_udp_freepacket(0);
 	net_udp_close(0);
	net_quit();
end
