Hi,

I have the following code snippet:

=== JavaScript ===

var client = new net.Socket();

client.connect(1337, '127.0.0.1', function() {
console.log('Connected');
client.write('Hello, server! Love, Client.');
});

client.on('data', function(data) {
console.log('Received: ' + data);
client.destroy(); // kill client after server's response
});

client.on('close', function() {
console.log('Connection closed');
});

=== END ===

#1 How can I convert and use the above functionality in ClojureScript?

#2 Is there a recommended approach to re-using JavaScript libraries
with cljs? For example: https://github.com/diversario/node-ssdp

Appreciate your help in this regard,

Thanks!

SK

P.S.: Newbie to ClojureScript.

-- 
Shakthi Kannan
http://www.shakthimaan.com

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at https://groups.google.com/group/clojurescript.

Reply via email to