1
我是新來的Matlab環境下Matlab的服務器程序錯誤
我嘗試使用現有的Java服務器套接字代碼 這裏implenment Matlab的套接字服務器是Matlab的服務器的代碼
import java.io.*;
import java.net.*;
try
providerSocket = ServerSocket(4443, 10);
System.out.println('Waiting for connection');
connection = providerSocket.accept();
System.out.println('Connection received from ');
out = ObjectOutputStream(connection.getOutputStream());
out.flush();
in = ObjectInputStream(connection.getInputStream());
sendMessage('Connection successful');
catch ME
這裏是錯誤當MATLAB執行我有...
error(ME.identifier, 'Connection Error: %s', ME.message)
end
Connection Error: Java exception occurred:
java.net.SocketException: Unrecognized Windows Sockets
error: 0: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(Unknown Source)
at java.net.ServerSocket.bind(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
謝謝 請幫我傢伙