Izaya 19 Posted June 24, 2014 Share Posted June 24, 2014 Before implimenting higher-level protocols, you'll want a lower-level way to make your messages appear as a stream, just like TCP sockets, right? That's where this comes in. ocsocket makes modems behave like TCP sockets. Functions: ocsocket.socket(port,address) That will return a socket object. Socket object functions: obj.init() Must be called to make a socket work. octcp.isData() Returns true if there is data to be read, false otherwise. obj.read(i) i is a number or character, if it's a number, it will read that many characters. If it's a string, it will read until that character appears. obj.write(string) Sends string to the target computer obj.close() Closes the socket and stops listening. And the download? http://pastebin.com/vyW5k820 Alternatively: pastebin get vyW5k820 ocsocket I reccomend you place it in /usr/lib That is all. Bai o/ Quote Link to post Share on other sites
Wuerfel_21 6 Posted June 24, 2014 Share Posted June 24, 2014 Good work, but i'm not going to use it, messages are just fine for me. When i ever need streams, i will use it. Quote Link to post Share on other sites
Cat 3 Posted November 10, 2014 Share Posted November 10, 2014 Nice job. This might be interesting for making emulations of Modern software...Maybe someone can make P2P protocols and things like that.I might implement this just to be Fancy ~ Quote Link to post Share on other sites