2013年12月17日星期二

How to develop an interface , the packet is what does that mean ?

China Unicom now has a business gateway interface , which describes some packet formats and state do , what you want to develop a messaging interface for others to use , how to get it ? Haonong not ? How long ?
------ Solution ---------------------------------------- ----
business gateway interface ? What is to be done ? I had to call a mobile texting interface. To send a very simple, put the data on the interface is OK , but with a variety of requirements, various processing on various slightly difficult .
------ Solution ---------------------------------------- ----
open a thread SOCKET, you can use the thread pool , followed by treatment protocol is a protocol to discuss ! ~
------ Solution --------------------------------------- -----
is based protocol document , by codec , spliced ​​into a byte array , through the socket send and receive What time
accordance with your agreement document status code to distinguish the request to do so.

You may ultimately provide the interface is actually containing similar sendRequest (xx xx) method , for someone to call .
------ For reference only -------------------------------------- -
is to provide an api interface Unicom , which used a packet . I mean, now they give according to the interface, an interface to let others develop their own use . To him this message how to use it ? Turn into xml format file? Do not understand the first time , please advise !
------ For reference only -------------------------------------- -
in Java to develop an interface that how they do ?
------ For reference only -------------------------------------- -
is now a little idea of ​​it! But for processing packets are feeling pretty big head ah !
------ For reference only -------------------------------------- -
packet processing method does not have a good point of it ?
------ For reference only -------------------------------------- -
positive solutions

没有评论:

发表评论