mysticbbs/mdl/mdltest4.pas

33 lines
599 B
ObjectPascal
Raw Normal View History

2012-02-13 15:48:58 -08:00
Program Test4;
Uses
2013-05-11 20:19:36 -07:00
m_io_Sockets;
2012-02-13 15:48:58 -08:00
Var
2013-05-11 20:19:36 -07:00
Client : TIOSocket;
2012-02-13 15:48:58 -08:00
Str : String;
Begin
2013-05-11 20:19:36 -07:00
Client := TIOSocket.Create;
2012-02-13 15:48:58 -08:00
WriteLn ('Attempting to connect to localhost port 23 for TEST3 server test');
2013-05-11 20:19:36 -07:00
Client.ConnectInit('localhost', 23);
Client.SetBlocking(False);
Repeat
Until Client.Connect;
// If Not Client.Connect ('localhost', 23) Then Begin
// WriteLn ('Connection failed');
// Client.Free;
// Halt;
// End;
2012-02-13 15:48:58 -08:00
Client.ReadLine(Str);
WriteLn('Received: ', Str);
Client.WriteLine ('Client connection successful!');
Client.Free;
End.