[英]How can I get the Client IP of the java RMI programming?
您需要調用RemoteServer
類中的唯一方法是getClientHost()
。 這就是您在標題中要求的內容。
我找到了解決方案以及你們的意思,謝謝:
我們需要一個try-catch來處理服務器接口實現中的getClientHost()函數。
這是代碼:
try{
System.out.println(getClientHost()); // display message
}catch(Exception e){}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.