Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias SocketTest {
- var %socket $Socket(google.com,80,GoogleSock)
- $socket(%socket,SockeOpen).sockopen
- $socket(%socket,SockRead).sockread
- $socket(%socket).connect
- }
- alias SockeOpen {
- echo -a You have successfully connected to $sock($sockname).ip $+ : $+ $sock($sockname).port - $string($socket($1).tag).get
- $socket($1,SOme **** to send).write
- echo -a Sent $qt(Some **** to send)
- $socket($1).delete
- }
- alias SockRead {
- var %data
- sockread %data
- echo -a Read $len(%data) bytes from socket $Socket($1).tag $+ : %data
Add Comment
Please, Sign In to add comment