mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
reference: SocketServer example enchanced (GetPeerName)
git-svn-id: svn://ultimatepp.org/upp/trunk@2077 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
9aff9a5b35
commit
1237ff6e8e
1 changed files with 1 additions and 1 deletions
|
|
@ -15,7 +15,7 @@ CONSOLE_APP_MAIN
|
|||
Socket s;
|
||||
if(server.Accept(s)) {
|
||||
String w = s.ReadUntil('\n');
|
||||
Cout() << "Request: " << w << '\n';
|
||||
Cout() << "Request: " << w << " from: " << s.GetPeerName() << '\n';
|
||||
if(w == "time")
|
||||
s.Write(AsString(GetSysTime()));
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue