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

  • Home
  • SEARCH
  • 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 7966353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T06:24:12+00:00 2026-06-04T06:24:12+00:00

I wrote a proxy service program that used boost asio, the proxy server has

  • 0

I wrote a proxy service program that used boost asio, the proxy server has two socket(client_socket_,server_socket_),If one of the socket is disconnected another one to remain active。For example, if read from client_socket_ results in error, i will close client_socket_ and then wait for client to reconnect and after client reconnects, I read from one socket and write to another.

The problem is that, when i close the client_socket_ how to cancel the asynchronous operation
in server_socket_? if i do not do this, the previous asynchronous operation will execute after client connected. The follow is handler tracking, handler 19 is need to cancel.

E:\code\vdoctor-r\code\dnc\Debug>forwardserver.exe
@asio|1337591080.941830|0*1|socket@0012FA58.async_accept
@asio|1337591107.009440|>1|ec=system:0
@asio|1337591107.009440|1*2|strand@003E8340.dispatch
@asio|1337591107.009440|>2|
@asio|1337591107.009440|2*3|socket@0012FAB0.async_connect
@asio|1337591107.025059|2*4|socket@0012FA58.async_accept
@asio|1337591107.025059|<2|
@asio|1337591107.025059|<1|
@asio|1337591107.025059|>3|ec=system:0
@asio|1337591107.025059|3*5|strand@003E8340.dispatch
@asio|1337591107.025059|>5|
2012-May-21 17:05:07 [info]-[e:\code\vdoctor-r\code\dnc\forwardserver\forward_se
rver.cpp(114):forward_server::handle_connect_to_server] connect to server succes
sful, start to receive data from both sides
@asio|1337591107.040678|5*6|socket@003E83D4.async_receive
@asio|1337591107.040678|5*7|socket@0012FAB0.async_receive
@asio|1337591107.040678|<5|
@asio|1337591107.040678|<3|
@asio|1337591107.040678|>6|ec=system:0,bytes_transferred=20
@asio|1337591107.040678|6*8|strand@003E8340.dispatch
@asio|1337591107.040678|>8|
@asio|1337591107.040678|8*9|socket@003E83D4.async_receive
@asio|1337591107.040678|<8|
@asio|1337591107.040678|<6|
@asio|1337591107.040678|>9|ec=system:0,bytes_transferred=17
@asio|1337591107.040678|9*10|strand@003E8340.dispatch
@asio|1337591107.040678|>10|
@asio|1337591107.040678|10*11|socket@0012FAB0.async_send
@asio|1337591107.056296|<10|
@asio|1337591107.056296|<9|
@asio|1337591107.056296|>11|ec=system:0,bytes_transferred=37
@asio|1337591107.056296|11*12|strand@003E8340.dispatch
@asio|1337591107.056296|>12|
@asio|1337591107.056296|12*13|socket@003E83D4.async_receive
@asio|1337591107.056296|<12|
@asio|1337591107.056296|<11|
@asio|1337591107.071915|>7|ec=system:0,bytes_transferred=20
@asio|1337591107.071915|7*14|strand@003E8340.dispatch
@asio|1337591107.071915|>14|
@asio|1337591107.071915|14*15|socket@0012FAB0.async_receive
@asio|1337591107.071915|<14|
@asio|1337591107.071915|<7|
@asio|1337591107.071915|>15|ec=system:0,bytes_transferred=18
@asio|1337591107.071915|15*16|strand@003E8340.dispatch
@asio|1337591107.071915|>16|
@asio|1337591107.071915|16*17|socket@003E83D4.async_send
@asio|1337591107.071915|<16|
@asio|1337591107.071915|<15|
@asio|1337591107.087534|>17|ec=system:0,bytes_transferred=38
@asio|1337591107.087534|17*18|strand@003E8340.dispatch
@asio|1337591107.087534|>18|
@asio|1337591107.087534|18*19|socket@0012FAB0.async_receive
@asio|1337591107.087534|<18|
@asio|1337591107.087534|<17|
@asio|1337591107.884087|>13|ec=asio.misc:2,bytes_transferred=0
@asio|1337591107.884087|13*20|strand@003E8340.dispatch
@asio|1337591107.884087|>20|
2012-May-21 17:05:07 [error]-[e:\code\vdoctor-r\code\dnc\forwardserver\forward_s
erver.cpp(273):forward_server::handle_read_header_from_client] read header from
client error,End of file
@asio|1337591107.884087|20|socket@003E83D4.close
@asio|1337591107.884087|<20|
@asio|1337591107.884087|<13|
@asio|1337591222.813720|>4|ec=system:0
@asio|1337591222.813720|4*21|strand@003E8340.dispatch
@asio|1337591222.813720|>21|
@asio|1337591222.813720|21*22|socket@003ECF2C.async_receive
@asio|1337591222.813720|21*23|socket@0012FAB0.async_receive
@asio|1337591222.813720|21*24|socket@0012FA58.async_accept
@asio|1337591222.813720|<21|
@asio|1337591222.813720|<4|
@asio|1337591222.813720|>22|ec=system:0,bytes_transferred=20
@asio|1337591222.813720|22*25|strand@003E8340.dispatch
@asio|1337591222.813720|>25|
@asio|1337591222.813720|25*26|socket@003ECF2C.async_receive
@asio|1337591222.813720|<25|
@asio|1337591222.813720|<22|
@asio|1337591222.813720|>26|ec=system:0,bytes_transferred=17
@asio|1337591222.813720|26*27|strand@003E8340.dispatch
@asio|1337591222.813720|>27|
@asio|1337591222.813720|27*28|socket@0012FAB0.async_send
@asio|1337591222.813720|<27|
@asio|1337591222.813720|<26|
@asio|1337591222.813720|>28|ec=system:0,bytes_transferred=37
@asio|1337591222.813720|28*29|strand@003E8340.dispatch
@asio|1337591222.813720|>29|
@asio|1337591222.813720|29*30|socket@003ECF2C.async_receive
@asio|1337591222.813720|<29|
@asio|1337591222.813720|<28|
@asio|1337591222.813720|>19|ec=system:0,bytes_transferred=20
@asio|1337591222.813720|19*31|strand@003E8340.dispatch
@asio|1337591222.813720|>31|
@asio|1337591222.813720|31*32|socket@0012FAB0.async_receive
@asio|1337591222.813720|<31|
@asio|1337591222.813720|<19|
@asio|1337591222.813720|>23|ec=system:0,bytes_transferred=18
@asio|1337591222.813720|23*33|strand@003E8340.dispatch
@asio|1337591222.829340|>33|
@asio|1337591222.829340|33*34|socket@0012FAB0.async_receive
@asio|1337591222.829340|<33|
@asio|1337591222.829340|<23|
  • 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-04T06:24:14+00:00Added an answer on June 4, 2026 at 6:24 am

    The only portable and reliable way to cancel async.operations on server_socket_ is to close it. See the following link for details.

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

Sidebar

Related Questions

I wrote a web service that respond JSON content lower than 1K. Which one
I wrote a program that forks some processes with fork(). I want to kill
I have a web service proxy. On that proxy there is a method that
I have a C# application that is a client to a web service. One
Here is my scenario: I have a proxy that actually has the SSL Cert
I'm trying to write simple proxy server for some purpose. In it I use
I'm looking to write a simple proxy server in .NET. Does anyone have any
I wrote a routine to remove pounds and ids from sharepoint fields that worked
I have a simple web service sitting on our internal network. I used SOAPUI
A few years ago I wrote a WCF service, which runs on a Windows

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.