Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to write/read directly TCP Streams in ASP.NET?

I'd like to write and read TCP Streams directly without any modifications by ASP or IIS. Is this possible?

Edit: Goal is to provide communication between a program and a server. Data exchange between them is less then 25 bytes per connection (in default case). So Headers will cause more traffic then the real data. I need to use ASP.Net because the owner of the server will not let me execute my programs.

like image 291
schwer Avatar asked Jan 01 '26 07:01

schwer


1 Answers

ASP.NET even in IIS 7.0 with it's new integrated mode doesn't reveal the underlying socket to your ASP.NET application by default. I'm not sure if there's any hack or third party out there. I think as a web server (IIS 7.0) and web development tool (ASP.NET) using HttpContext and Response objects there are many things you can do like accessing underlying output stream via Response.OutputStream or closing the socket by calling Response.Close() as well.

like image 144
Xaqron Avatar answered Jan 03 '26 21:01

Xaqron



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!