added connectToPeerGroupLeader() for KaZaServer

git-svn-id: svn://anubis/gvsu@39 45c1a28c-8058-47b2-ae61-ca45b979098e
This commit is contained in:
josh 2008-03-08 22:50:25 +00:00
parent ed4ccea45c
commit a96c1edaae

View File

@ -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()
{
}