- 1、本文档共19页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
计算机论文(Computer paper)
计算机论文(Computer paper)
This paper describes the use of JAVA programming language to write network communication programs based on client / server applications, and discusses SOCKET mechanisms, input and output streams, and program implementation code.
Keywords JAVA, network, SOCKET, APPLET
The system structure on the network for client / server mode, the server is responsible for data transmission and image storage, maintenance, management and operation, sending demand and display client is responsible for man-machine interface data recovery.
Heres how to use JAVA for network programming:
1) because the client establishes the connection with the server through IE, the client uses Applet, and the server uses Application;
2) the server should be set to multiple threads to answer requests from multiple clients;
3) both ends communicate using the SOCKET mechanism.
1 Java input / output stream concept:
The filtered streams DataInputStream and DataOutputStream also implement interfaces DataInput and DataOutput, as well as subclasses of FilterInputStream and FilterOutputStream. The methods defined in the DataInput interface mainly includes the basic types of data read from a stream, read a line, or read the specified length in bytes, such as readBoolean (readInt) (readLine), readFully (), (). The methods defined in the DataOutput interface is an array of bytes written in basic types of data to flow or write to a certain length, such as writeChar (writeDouble), (DataInputStream) from the basic types of data connected to the input stream read machine independent, input mode to achieve an independent of the specific platform; DataInputStream you can write to the output of the basic types of connected data flow.
2 Socket mechanism
Socket is designed for the client / server model, and the two programs on the network exchange data through a two-way communication link. One end of the two-way link is called a Socket. Socket is commonly used to connect clients and service parties. T
您可能关注的文档
- 职业测试(Vocational test).doc
- 聋儿早期干预社区家庭康复模式的建立(The establishment of deaf children early intervention community family rehabilitation mode).doc
- 耽美经典语句(Tanbi classic statement).doc
- 职务分析样本——财务类(Job analysis sample - Financial).doc
- 职业类英语词汇(Vocational English Vocabulary).doc
- 职场如何说话(How does the workplace speak).doc
- 职场杂谈房子向左 事业向右(Workplace gossip the house left right career).doc
- 职场白领如何在竞争中脱颖而出(How do white-collar workers stand out in the competition).doc
- 职场白骨精抗氧化全攻略(Workplace Baigujing antioxidant Raiders).doc
- 职工工伤与职业病致残程度鉴定(Worker injury and occupational disability degree appraisal).doc
文档评论(0)