I was working on a little project for school, i wanted to make a sort of chat application that me and the other students could use over the LAN network, I scrapped the project a while ago , i can't seem to remember why and then restarted it yesterday. Everything seems fine and i get the client connect and disconnect messages but no messages that i try to send are received.

Could someone please tell me if the components im using will work for the project, and maybe how to fix my problem??

Heres the coding

unit Gladiator_DATA;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, ComCtrls, ScktComp;

type
TForm1 = class(TForm)
RichEdit1: TRichEdit;
Label1: TLabel;
Button1: TButton;
Button2: TButton;
Label3: TLabel;
Edit2: TEdit;
Panel1: TPanel;
Panel2: TPanel;
ComboBox1: TComboBox;
Button3: TButton;
Button4: TButton;
Label4: TLabel;
Edit3: TEdit;
Timer1: TTimer;
ServerSocket1: TServerSocket;
Edit1: TEdit;
Button5: TButton;
Panel3: TPanel;
RadioGroup1: TRadioGroup;
ClientSocket1: TClientSocket;
procedure FormCreate(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure ClientSocket1Connect(Sender: TObject; Socket: TCustomWinSocket);
procedure ClientSocket1Connecting(Sender: TObject;
Socket: TCustomWinSocket);
procedure ClientSocket1Error(Sender: TObject; Socket: TCustomWinSocket;
ErrorEvent: TErrorEvent; var ErrorCode: Integer);
procedure ServerSocket1ClientConnect(Sender: TObject;
Socket: TCustomWinSocket);
procedure ServerSocket1ClientDisconnect(Sender: TObject;
Socket: TCustomWinSocket);
procedure Button5Click(Sender: TObject);
procedure ClientSocket1Read(Sender: TObject; Socket: TCustomWinSocket);
procedure ServerSocket1ClientWrite(Sender: TObject;
Socket: TCustomWinSocket);
procedure ServerSocket1Accept(Sender: TObject; Socket: TCustomWinSocket);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
serversocket1.Port:=strtoint(edit2.Text);
serversocket1.Active:=true;
//Notify
richedit1.lines.Add('[SERVER] Now Hosting On Port '+edit2.text );
//Notify END
button2.Enabled:=true;
button1.Enabled:=false;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
serversocket1.Active:=false;
Serversocket1.Close;


richedit1.lines.Add('[SERVER] Hosting Disabled On Port '+edit2.text );

button2.Enabled:=false;
button1.Enabled:=true;
end;

procedure TForm1.Button3Click(Sender: TObject);
begin


clientsocket1.Host:=combobox1.text;
clientsocket1.Port:=strtoint(edit3.text);
clientsocket1.Active:=true;


button3.Enabled:=false;
button4.Enabled:=true;

end;

procedure TForm1.Button4Click(Sender: TObject);
begin
clientsocket1.Active:=false;
Clientsocket1.Close;

//Notify
richedit1.lines.Add('[CLIENT] Silenced '+combobox1.Text +' On Port '+edit3.text);
//Notify END
button3.Enabled:=true;
button4.Enabled:=false;

end;

procedure TForm1.Button5Click(Sender: TObject);
begin
clientsocket1.socket.sendtext ('[Message] '+edit1.text);

end;

procedure TForm1.ClientSocket1Connect(Sender: TObject;
Socket: TCustomWinSocket);
begin
richedit1.lines.Add('[CLIENT] Connection To '+combobox1.Text +' On Port '+edit3.text +' Succeeded.');

end;

procedure TForm1.ClientSocket1Connecting(Sender: TObject;
Socket: TCustomWinSocket);
begin
richedit1.lines.Add('[CLIENT] Trying To Listen On '+combobox1.Text +' On Port '+edit3.text);

end;

procedure TForm1.ClientSocket1Error(Sender: TObject; Socket: TCustomWinSocket;
ErrorEvent: TErrorEvent; var ErrorCode: Integer);
begin
richedit1.Lines.add('[CLIENT] An Error Has Occured. ');
end;

procedure TForm1.ClientSocket1Read(Sender: TObject; Socket: TCustomWinSocket);
begin
richedit1.Lines.Add(clientsocket1.Socket.ReceiveText);
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
panel3.Caption:='';
radiogroup1.Items.Add('Send As Server');
radiogroup1.Items.Add('Send As Client');
richedit1.Clear;
edit1.Clear;
edit2.Clear;
edit3.Clear;
combobox1.Clear;
panel1.Caption:='';
panel2.Caption:='';
combobox1.Items.Add('Localhost') ;
button2.Enabled:=false;
button4.Enabled:=false;
end;

procedure TForm1.ServerSocket1Accept(Sender: TObject; Socket: TCustomWinSocket);
begin

end;

procedure TForm1.ServerSocket1ClientConnect(Sender: TObject;
Socket: TCustomWinSocket);
begin
richedit1.Lines.Add('[SERVER] A Client Has Connected');
end;

procedure TForm1.ServerSocket1ClientDisconnect(Sender: TObject;
Socket: TCustomWinSocket);
begin
richedit1.Lines.Add('[SERVER] A Client Has Disconnected');
end;

procedure TForm1.ServerSocket1ClientWrite(Sender: TObject;
Socket: TCustomWinSocket);
begin
showmessage(serversocket1.Socket.ReceiveText);
end;

procedure TForm1.Timer1Timer(Sender: TObject);
begin
richedit1.Clear;
end;

end.