All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class NET.shudo.moba.net.SocketAuthenticator

java.lang.Object
   |
   +----NET.shudo.moba.net.SocketAuthenticator

public class SocketAuthenticator
extends Object
identd などの Authentication Server (RFC931) から OS名、ユーザID を得るクラス。
UDP ではなく TCP を利用。


Constructor Index

 o SocketAuthenticator(InetAddress, int, int)
Auth.
 o SocketAuthenticator(Socket)
 o SocketAuthenticator(String, int, int)

Method Index

 o isNoUser()
コンストラクタで指定したポートを利用しているユーザがいなければ真。
 o main(String[])
 o OSName()
OS名 を返す。
 o responce()
Auth.
 o userID()
ユーザID を返す。

Constructors

 o SocketAuthenticator
 public SocketAuthenticator(Socket sock) throws IOException
 o SocketAuthenticator
 public SocketAuthenticator(String host,
                            int localPort,
                            int remotePort) throws IOException
 o SocketAuthenticator
 public SocketAuthenticator(InetAddress addr,
                            int localPort,
                            int remotePort) throws IOException
Auth. Server から OS名、ユーザID を得る。
失敗した場合は IOException を throw する。
指定されたポートを利用しているユーザがいなかった場合は SocketAuthenticator#isNoUser() が真を返すようになる。

See Also:
isNoUser

Methods

 o responce
 public String responce()
Auth. Server のレンスポンスを返す。

 o OSName
 public String OSName()
OS名 を返す。

 o userID
 public String userID()
$B%f!<%6ID を返す。

 o isNoUser
 public boolean isNoUser()
$B%3%s%9%H%i%/%?$G;XDj$7$?%]!<%H$rMxMQ$7$F$$$k%f!<%6$,$$$J$1$l$P??!#

 o main
 public static void main(String args[]) throws IOException

All Packages  Class Hierarchy  This Package  Previous  Next  Index