Swiftpack.co - Package - piyushchauhan2011/BlueSocketTest

BlueSocketTest

  • Run swift build
  • Then .build/debug/BlueSocketTest
  • Open another terminal and connect using telnet 127.0.0.1 1337

Example Server Response

.build/debug/BlueSocketTest
Connect using Terminal via 'telnet 127.0.0.1 1337'
Listening on port: 1337
Accepted connection from: 127.0.0.1 on port 54792
Server received from connection at 127.0.0.1:54792: piyush

Server received from connection at 127.0.0.1:54792: QUIT

Example Client Response

telnet 127.0.0.1 1337
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Hello, type 'QUIT' to end session
piyush
Server response:
piyush

QUIT
Server response:
QUIT

Connection closed by foreign host.

Github

link
Stars: 0
Help us keep the lights on

Dependencies

Used By

Total: 0