Otr2p stands for "one time request response protocol 1.0". it is easiest protocol built on the top of tcp/ip.
if you want to contribute or suggest about protocol you are hereby invited. this protocol only intented for short message exchange. file download, upload or send big chunk of date not expected from server side.
Otr2poh is other protocol inherited from otr2p. it is built on top of http. otr2poh is another separate protocol.
Server side sepcification: server side should accept this kind of message format. "**CMD**clientid**data"
where CMD here is NEW , MS , DS.
NEW: means is new client want to inform Otr2p server. now this client exist on server.
MS:means connected client send message for Otr2p server.
DS:means connect client should want to go. now it will never come with same that it.
Server should have some way to store client id. server should not persist for client id long.
server should define some way to expire clientid if that client request does not come in two minute.
Clientside:
client side is just sender of command. Otr2p is simple no handsake required. just send message with following command
NEW, MS, DS.
note: server should definitely discard any data send by client in NEW or DS command. so never try to send data in that manner.
note: this protocol is not confirm to work while some client server working on this. if you want to use sever client communication throught browser than you should see Otr2poh. which is under work from large time.
java example: for client side connect new further specification given above
class Otr2pClient
{
public Otr2pClient()
{
}
public static void main(String[] args)
{
Socket socket=new Socket("otr2pclientserver.com",8080);
String data="**NEW**+System.currentTimeMills()+**";
socket.getOutputStream().write(data.getBytes());
//client connected further communication require
}
}
if you want to contribute or suggest about protocol you are hereby invited. this protocol only intented for short message exchange. file download, upload or send big chunk of date not expected from server side.
Otr2poh is other protocol inherited from otr2p. it is built on top of http. otr2poh is another separate protocol.
Server side sepcification: server side should accept this kind of message format. "**CMD**clientid**data"
where CMD here is NEW , MS , DS.
NEW: means is new client want to inform Otr2p server. now this client exist on server.
MS:means connected client send message for Otr2p server.
DS:means connect client should want to go. now it will never come with same that it.
Server should have some way to store client id. server should not persist for client id long.
server should define some way to expire clientid if that client request does not come in two minute.
Clientside:
client side is just sender of command. Otr2p is simple no handsake required. just send message with following command
NEW, MS, DS.
note: server should definitely discard any data send by client in NEW or DS command. so never try to send data in that manner.
note: this protocol is not confirm to work while some client server working on this. if you want to use sever client communication throught browser than you should see Otr2poh. which is under work from large time.
java example: for client side connect new further specification given above
class Otr2pClient
{
public Otr2pClient()
{
}
public static void main(String[] args)
{
Socket socket=new Socket("otr2pclientserver.com",8080);
String data="**NEW**+System.currentTimeMills()+**";
socket.getOutputStream().write(data.getBytes());
//client connected further communication require
}
}