Package common.connection

Examples of common.connection.ConnectionWriterInterface


  public void sendSearchResults(final int cookie, final Object results)
  {
    int protocolId = ClientServerProtocol.PROTOCOL_FILES;
    int opcode = ClientServerProtocol.Files.OP_RESULTS;
    send(protocolId, opcode, new ConnectionWriterInterface()
    {
      public void run(ObjectOutputStream os) throws IOException
      {
        os.writeInt(cookie);
        os.writeObject(results);
View Full Code Here


  public void requestFile()
  {
    int protocolId = PeerProtocol.PROTOCOL_TRANSFER;
    int opcode = PeerProtocol.Transfer.OP_REQUEST_FILE;
    send(protocolId, opcode, new ConnectionWriterInterface()
    {
      public void run(ObjectOutputStream os) throws IOException
      {
        os.writeObject(download.getFile());
        os.writeLong(download.getCompletedSize());
View Full Code Here

  {
    ServerConnection serverConnection = getConnectionManager().getConnection();

    int protocolId = ClientServerProtocol.PROTOCOL_FILES;
    int opcode = ClientServerProtocol.Files.OP_KEYWORDS;
    serverConnection.send(protocolId, opcode, new ConnectionWriterInterface()
    {
      public void run(ObjectOutputStream os) throws IOException
      {
        os.writeInt(getId());
        os.writeObject(keywords);
View Full Code Here

  public void query(ServerConnection serverConnection)
  {
    int protocolId = ClientServerProtocol.PROTOCOL_FILES;
    int opcode = ClientServerProtocol.Files.OP_GET_INFO;
    serverConnection.sendOverlapped(protocolId, opcode,
        new ConnectionWriterInterface()
        {
          public void run(ObjectOutputStream os) throws IOException
          {
            os.writeObject(file);
          }
View Full Code Here

  {
    upload.setCompletedSize(offset);

    int protocolId = PeerProtocol.PROTOCOL_TRANSFER;
    int opcode = PeerProtocol.Transfer.OP_FILE;
    send(protocolId, opcode, new ConnectionWriterInterface()
    {
      public void run(ObjectOutputStream os) throws IOException
      {
        upload.transfer(fis, os);
      }
View Full Code Here

  public void setPort() throws IOException
  {
    int protocolId = ClientServerProtocol.PROTOCOL_LINK;
    int opcode = ClientServerProtocol.Link.OP_SET_PORT;
    sendOverlapped(protocolId, opcode, new ConnectionWriterInterface()
    {
      public void run(ObjectOutputStream os) throws IOException
      {
        os.writeInt(Settings.connection.port);
      }
View Full Code Here

  public void setNickName() throws IOException
  {
    int protocolId = ClientServerProtocol.PROTOCOL_NAMING;
    int opcode = ClientServerProtocol.Naming.OP_SET_NAME;
    sendOverlapped(protocolId, opcode, new ConnectionWriterInterface()
    {
      public void run(ObjectOutputStream os) throws IOException
      {
        os.writeUTF(Settings.application.nickname);
      }
View Full Code Here

TOP

Related Classes of common.connection.ConnectionWriterInterface

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.