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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.