; ; UDP Send code ; ; This code sends each string to an address (port on a host). ; ; Written by Anton Reinauer "" If b$=Chr$(13) ;send string on return key WLocate 10,30 Print " " xpos=10 t$="SENT: " + send$ Gosub Print_String WriteUDP{&send$,Len(send$),hostlen2.l} ; send string send$="" Else ; build string to send send$=send$+b$ WLocate xpos,30 xpos+8 Print b$ ; echo key press EndIf EndIf ev.l=Event Until ev=$200 ; shut down if close gadget hit CloseTCP{} ; close connection WLocate 10,30 Print " " WLocate 10,30 Print"Connection closed" Delay_(10) FreeMem TCPmem,$2000 End ;**************************************** .Print_String ypos+10 If ypos=200 Then ypos=50 WLocate 10,ypos Print " " WLocate 10,ypos Print t$ ; print string received Return