mysticbbs/mdl/mdltest4.pas

53 lines
1.6 KiB
ObjectPascal
Raw Normal View History

// ====================================================================
// Mystic BBS Software Copyright 1997-2013 By James Coyle
// ====================================================================
//
// This file is part of Mystic BBS.
//
// Mystic BBS is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Mystic BBS is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Mystic BBS. If not, see <http://www.gnu.org/licenses/>.
//
// ====================================================================
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.