added connectToPeerGroupLeader() for KaZaServer
git-svn-id: svn://anubis/gvsu@39 45c1a28c-8058-47b2-ae61-ca45b979098e
This commit is contained in:
parent
ed4ccea45c
commit
a96c1edaae
@ -30,6 +30,25 @@ public class KaZaServer implements Runnable
|
||||
}
|
||||
}
|
||||
|
||||
public void connectToPeerGroupLeader(String peerName)
|
||||
{
|
||||
Socket s;
|
||||
try
|
||||
{
|
||||
s = new Socket(peerName, LISTEN_PORT);
|
||||
DataOutputStream os = new DataOutputStream(s.getOutputStream());
|
||||
os.writeBytes("USER KaZaServer\n");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return;
|
||||
}
|
||||
synchronized (m_peerGroupLeaders)
|
||||
{
|
||||
m_peerGroupLeaders.add(s);
|
||||
}
|
||||
}
|
||||
|
||||
public void close()
|
||||
{
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user