program main_client; uses crt, blcksock in 'lib\blcksock.pas'; var DGramSocket : TUDPBlockSocket; s : integer = 1234567; begin DGramSocket := TUDpBlockSocket.Create; DGramSocket.CreateSocket; DGramSocket.bind('127.0.0.1','2008'); with DGramSocket do writeln('binding DGramSocket ',GetErrorDesc(LastError)); DGramSocket.Connect('127.0.0.1','2007'); with DGramSocket do writeln('connecting DGramSocket ',GetErrorDesc(LastError)); while true do begin if keypressed then begin if readkey = #0 then readkey; DGramSocket.SendBufferTo(@s,4); with DGramSocket do writeln('sending ',GetErrorDesc(LastError)); end; end; end.