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 6929185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:17:05+00:00 2026-05-27T11:17:05+00:00

I am trying to send a long string via telnet to my application. in

  • 0

I am trying to send a long string via telnet to my application.

in my application, I set up a socket with:

{ok, Sock} = gen_tcp:listen(Port, [{active, true}, {reuseaddr, true}],
{ok, Sock} = gen_tcp:accpet(Sock),
% start a process when someone connects
{ok, Pid} = my_sup:start_handler(Sock),
inet:setopts(Socket,[{active, once},{buffer, 2310731}, {recbuf, 1310731},{sndbuf, 1310731}]),
gen_tcp:controlling_process(Socket, Pid),

My process that handles the connected client is a gen_server and I use the standard

handle_info ({tcp, Sock, Data}, State) ->

to receive and process the incomming message from the sender.

Initially, I could only send a string of about 1,500 characters, then I added the setopts/2 command to increace buffer sizes. But I cannot get the socket to handle more than about 3,160 charcters.

I have printed out the values via getopts and verified that they are what is represented in the setopts/2 call.

I can utilize my http interface to POST string values at least 4 times as large and can get them via the telnet / socket client…

What am I missing?

  • 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-05-27T11:17:06+00:00Added an answer on May 27, 2026 at 11:17 am

    If you don’t specify packet or line option you will receive only what was send by one TCP packet. So if you want receive more you have to write our own receive loop and protocol. Additional data are just waiting in buffers but you hadn’t collected them.

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

Sidebar

Related Questions

Hello all my friends, I am trying to send a long string through socket
I'm trying to send a long string by WCF, around 64k chars long. When
I'm trying to send and receive using pipes: send.cpp struct { long a; long
I am trying to send E-mails asynchronously and it works fine as long as
I'm trying to send email to Active Directory distribution groups. I know you can
How do I compress/decompress a string in VB.NET ? I am trying to send
I'm trying to create a client-server program that send and receive a string (its
I'm trying to serialize objects to send over network through a socket using only
I'm trying to send via PendingIntent some extra data, like: MyMessage message; //... Intent
I am trying to make an Application, that is posible to send SMS, and

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.