freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

企業(yè)即時(shí)通外文文獻(xiàn)翻譯-文庫(kù)吧資料

2025-05-22 16:57本頁(yè)面
  

【正文】 wer than servers, which means that your server code is going to spend a lot of time simply waiting for users to say things. And you never know who is going to say something first. If you have a single thread, and it39。s main strengths are working and multithreading. That is not to say that other languages don39。 // Create a new thread for this connection, and then forget // about it new ServerThread( this, s )。 6 // Save this stream so we don39。ve got it ( Connection from +s )。 // Keep accepting connections forever while (true) { // Grab the next ining connection Socket s = ()。 // Tell the world we39。ve been talking about: listening on a port, accepting new connections, and creating threads to deal with them. It also does a few other things that will be useful later. Let39。t pile up. The code Let39。t return until there are.) Serialization is a useful way, in general, to deal with things that are happening simultaneously. A potential drawback, however, is that it can remove parallelism? That is to say serialization can prevent us from saving time by working on multiple things at the same time. In the code above, while the program is dealing with one connection, other connection might be piling up. But serialization is not a problem for us because each time a connection es in, we39。ve dealt with this connection, you call accept() and get the next one. This way, no matter how fast connections are ing, and no matter how many processors or work interfaces your machine has, you get the connections one at a time. (And if there aren39。 // loop forever while (true) { // get a connection Socket newSocket = ()。re still trying to deal with the connections as they arrive. Here39。s no way to control the order, or the timing, with which the connections are arriving. As we39。s how the chat is going to work. We mentioned above that the Java language provides an object called a Socket, which represents a connection to a program somewhere else and through which data can pass. But how do we get this socket in the first place? A client, almost by definition, initiates the connection to a server. Therefore, the first job of a server is to wait for a connection to e in. That is, we need something to give us the Sockets that are connected to our clients. That39。ll continue to the next section to see how we accept new connections and what we do with them. WhileAccept loop We39。 } Now that we39。s the main() routine: // Main routine // Usage: java Server port static public void main( String args[] ) throws Exception { // Get the port from the mand line int port = ( args[0] )。 } The main() routine We39。t know about them yet,you really should. See the package for more information.) So, now we get to the first of our seven elements, the Listener Class. We39。 the term is taken directly from the terminology of general IP (Inter Protocol) work programming. In Java programs, a Socket object is simply a wrapper around the lowlevel。ll see, this isn39。t require a Web server or application server, although a Web server or application server will likely be used to serve the client applet to the client. More advanced server systems often embed the server code within a larger framework. This framework might be used to supply features such as load balancing, special libraries for handling large numbers of clients, process migration, and database services。ll describe the server. Doing so has a certain chronological elegance, because in our running system, the server will have to start before any of the clients can connect to it. Our server will be a standalone program a single Java process running on its own machine. It won39。ll be creating a strippeddown, connectionoriented server. Learning the basic framework will help you a great deal in creating other connectionoriented servers in the future. Why create from scratch? In creating this prototype server, we39。ll learn a basic framework that you can use when creating such a server, using timehonored techniques that work well in many situations. 2. Introduction We39。ll be able to follow the examples, even if you have little or no experience doing this kind of programming. You will, however, need to be familiar with basic objectoriented programming in the Java language. In this tutorial, you39。 畢業(yè)設(shè)計(jì)(論文)外文參考文獻(xiàn)翻譯 計(jì)算機(jī)科學(xué)與信息工程系 系(院) 2020 屆 題 目 企 業(yè) 即 時(shí) 通 Instant Messaging for Enterprises 課題類(lèi)型 技術(shù)開(kāi)發(fā) 課題來(lái)源 自 選 學(xué)生姓名 許帥 專(zhuān)業(yè)班 級(jí) 04 計(jì)算機(jī)科學(xué)與技術(shù) 指導(dǎo)老師 王占中 職 稱(chēng) 工程師 完成日期: 2020 年 4 月 6 日 目 錄 INSTANT MESSAGING FOR ENTERPRISE .................................. 1 1. Tips ...................................................................................................................
點(diǎn)擊復(fù)制文檔內(nèi)容
畢業(yè)設(shè)計(jì)相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1