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

正文內(nèi)容

分布式系統(tǒng)實驗報告-資料下載頁

2025-08-01 18:51本頁面
  

【正文】 0。public InetAddress getAddress() {return 。}public int getPort() {return 。}} 4. 用流式 socket 實現(xiàn)的 echo 應(yīng)用程序包的構(gòu)架,列明各程序之間的關(guān)系。共有的:import .*。import .*。public class MyStreamSocket extends Socket { private Socket socket。 private BufferedReader input。 private PrintWriter output。 MyStreamSocket(InetAddress acceptorHost, int acceptorPort ) throws SocketException, IOException{ socket = new Socket(acceptorHost, acceptorPort )。 setStreams()。 } MyStreamSocket(Socket socket) throws IOException { = socket。 setStreams()。 } private void setStreams() throws IOException{ InputStream inStream = ()。 input = new BufferedReader(new InputStreamReader(inStream))。 OutputStream outStream = ()。 output = new PrintWriter(new OutputStreamWriter(outStream))。 } public void sendMessage(String message) throws IOException { (message)。 ()。 } public String receiveMessage() throws IOException { String message = ()。 return message。 }} 客戶端:import .*。public class EchoClient2 {static f?inal String endMessage = .。public static void main(String[] args) {InputStreamReader is = new InputStreamReader()。BufferedReader br = new BufferedReader(is)。try {(Wele to the Echo client.\n +What is the name of the server host?)。String hostName = ()。if (() == 0)hostName = localhost。 (What is the port number of the server host?)。String portNum = ()。if (() == 0)portNum = 7。EchoClientHelper2 helper = new EchoClientHelper2(hostName, portNum)。boolean done = false。String message, echo。while (!done) {(Enter a line to receive an echo + from the server, or a single period to quit.)。message = ()。if ((()).equals (endMessage)){done = true。()。}else {echo = ( message)。(echo)。}}} catch (Exception ex) {()。} } }import .*。import .*。public class EchoClientHelper2 {static f?inal String endMessage = .。private MyStreamSocket mySocket。private InetAddress serverHost。private int serverPort。EchoClientHelper2(String hostName,String portNum)throws SocketException,UnknownHostException, IOException { = (hostName)。 = (portNum)。 = new MyStreamSocket(, )。(Connection request made)。} public String getEcho( String message) throws SocketException, IOException{String echo = 。 ( message)。echo = ()。// now receive the echoreturn echo。} public void done() throws SocketException, IOException{(endMessage)。()。} } 服務(wù)端:import .*。import .*。public class EchoServer2 {static f?inal String endMessage = .。public static void main(String[] args) {int serverPort = 7。 String message。if ( == 1 )serverPort = (args[0])。 try {ServerSocket myConnectionSocket = new ServerSocket(serverPort)。(Daytime server ready.)。 while (true) { (Waiting for a connection.)。MyStreamSocket myDataSocket = new MyStreamSocket(())。(connection accepted)。boolean done = false。while (!done) {message = ()。(message received: + message)。if ((()).equals (endMessage)){(Session over.)。()。done = true。}else {(message)。}} } } catch (Exception ex) {()。}} } 實驗 九 虛擬機的使用與 Linux 系統(tǒng)的安裝一、實驗?zāi)康模?) 理解虛擬機軟件的工作原理與運行機制;(2) 掌握 VMware Workstation 的下載、安裝、配置與使用;(3) 掌握 Linux 系統(tǒng)(Ubuntu)的配置與使用方法。二、實驗內(nèi)容和步驟1 可以到官方網(wǎng)站下載 虛擬機安裝軟件,直接點 next 下一步直接安裝完成即可2 添加設(shè)備,點擊 add,添加過程就像剛開始配置安裝虛擬機過程一樣。3 創(chuàng)建一塊磁盤。 當(dāng)?shù)谝淮谓⑻摂M機時,請選擇第一項,第二項適用于建立第二個或更多虛擬機,即使用已經(jīng)建立好的虛擬機磁盤,這樣可以減少虛擬機占用的真實磁盤空間。第三項則允許虛擬機直接讀寫磁盤空間,比較危險,所以適合熟悉使用磁盤的高級用戶,如果操作失誤會把真實磁盤里的內(nèi)容刪掉的。 設(shè)置虛擬機磁盤容量。第一項可以定義磁盤大小。第二項允許虛擬機無限使用磁盤空間,但需要真實磁盤足夠大。第三項則限制了每塊虛擬磁盤的最大容量為 2G。 這一步是最后一步了,虛擬磁盤即將被創(chuàng)建,advanced 里可以更改虛擬磁盤的接口是SCSI 或是 IDE4 虛擬機共享上網(wǎng)第一步:點擊 VMware 菜單“虛擬→設(shè)置”,再點選網(wǎng)卡 NIC 并設(shè)置它的屬性,可在“網(wǎng)橋”、“NAT”、“僅是主機”中任選一項,但一定要記住所選的項目。第二步:把宿主電腦網(wǎng)絡(luò)連接的 IP 地址設(shè)為自動獲取。第三步:在宿主電腦“網(wǎng)絡(luò)和撥號連接”窗口中,右擊 ADSL 虛擬撥號連接,選擇“屬性”命令,在“共享”標(biāo)簽頁內(nèi)選中“啟用此連接的 Internet 連接共享”,然后根據(jù)虛擬機網(wǎng)卡的工作方式選擇一個網(wǎng)絡(luò)連接(見圖 6),具體對應(yīng)如下:網(wǎng)橋—本地連接NAT—VMware Network Adapter VMnet8 只是主機—VMware Network Adapter Vmnet1第四步:宿主電腦啟用網(wǎng)絡(luò)連接后,相應(yīng)網(wǎng)絡(luò)連接的 IP 地址被自動設(shè)置為 。因此,需要把虛擬機的 IP 地址設(shè)置為 (X 取值范圍為 2~254),同時要把 DNS服務(wù)器地址、默認(rèn)網(wǎng)關(guān)都設(shè)置為 。這樣,宿主電腦上網(wǎng)后,虛擬機也就可以通過宿主計算機共享上網(wǎng)了三、實驗結(jié)果
點擊復(fù)制文檔內(nèi)容
電大資料相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1