VCMP Sockets Example

From Crys, 9 Years ago, written in D, viewed 691 times.
URL https://paste.godclan.hu/view/FKyxNmFx Shorturl Error: Input provided by user is not valid Embed
Download Paste or View Raw
  1. function connect() {
  2.         socket <- NewSocket("onSocketReceive");
  3.         socket.Connect(SERVER, PORT);
  4.         socket.SetNewConnFunc("onSocketConnect");
  5. }
  6.  
  7. function disconnect() {
  8.         socket.Send("Disconnecting, bye!");
  9.         socket.Delete();
  10. }
  11.  
  12. function onSocketConnect() {
  13.         socket.Send("Hi, I'm connected!");
  14. }
  15.  
  16. function onSocketReceive(data) {
  17.         print(data);
  18. }

Reply to "VCMP Sockets Example"

Here you can reply to the paste above