Private Sub astream_NewData (Buffer() As Byte)
Dim strAs String = BytesToString(Buffer,0,Buffer.Length,"UTF8")
Select Case str
Case "TMSG"
ToastMessageShow("TMSG",True)
End Select
' Log( str)
End Sub
server delphi
B4X:
procedure TForm1.IdTCPServer1Execute(AContext: TIdContext);
var
str: string;
begin
str := AContext.Connection.IOHandler.AllData();
if str <> EmptyStr then
begin
AContext.Connection.IOHandler.WriteLn('TMSG');
// do something with received string s
end;
end;
Can you provide an example exe which implements such a server which i can start/stop on my PC? Maybe with a memo for the incoming messages and a edit to send something or so.