Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9181967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:26:53+00:00 2026-06-17T18:26:53+00:00

I am writing an application to send small file (~2kb) from Netty server to

  • 0

I am writing an application to send small file (~2kb) from Netty server to client through WebSocket.

For testing whether the file send success, I had the follows test.

  1. A client connect to server.
  2. Setting to drop all packets from server on the client machine.
  3. The server send a file to the client.
  4. Checking the result of “ChannelFuture” on the server.

I got true from “future.isSuccess()” and “future.isDone()” immediately when I send a file with ~2kb in this test even client side cannot receive the file.

I repeated this test for files with larger size. I find out that if the file size is larger than ~7kb, the “ChannelFuture future” will wait the feedback from transmission. This is the result I expected.

I am using Netty3.6.1 and my application is built base on “org.jboss.netty.example.http.websocketx.server”.

Here is part of my code:

ChannelBuffer cb = ChannelBuffers.copiedBuffer(myfile_byteArray);   
ChannelFuture result = ctx.getChannel().write( new BinaryWebSocketFrame( cb ) );
result.addListener(new ChannelFutureListener() {
            public void operationComplete(ChannelFuture future) throws Exception {
                if (future.isSuccess()){  
                    System.err.println("future.isSuccess()");  
                }  
                if (future.isDone()){  
                    System.err.println("future.isDone()");  
                }  
                if (future.isCancelled()){  
                    System.err.println("future.isCancelled()");  
                }  
            }
        });

Does anyone know how could I having “ChannelFuture” work correctly for file with small file size?

Many thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T18:26:55+00:00Added an answer on June 17, 2026 at 6:26 pm

    ChannelFuture will only be notified if the data can be written out to the remote peer. So if it is notified then the other peer received the data without a problem. This is true for all sizes of data.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a small client/server application in c++ with winsock and I can't explain
I'm writing an iPhone application that needs to send small bits of information (two
I'm writing a small (C#) client application that sends data using a TCP/IP connection
im writing a file transfer application to send and receive a large data like
I'm writing web application where I need to push data from server to the
I'm writing an application that needs to send a file over the network. I've
I have a small server application which receives connections from multiple clients. The clients
At application shutdown I want to send a file to a server via Internet
Hi i have written a server application which accepts a name from the client
I am building a small chat application in which client A wants to send

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.