View Single Post
Socket problems with MT3 API
  #1 (permalink)  
Old 12-29-2005, 09:08 AM
fxtrader625 fxtrader625 is offline
Freshman
 
Join Date: Dec 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
fxtrader625 is on a distinguished road
Default Socket problems with MT3 API

Hi all,

I am writing an automatic trading system on a website using Microsoft Visual Studio, C#, ASP.NET, MT3APIDotNet.DLL and mtapi.DLL. With an InterbankFX demo account, it works fine when using my local host (on PC). Sometimes, I saw a problem "Invalid Socket Handle" when trying to run this application. It happens sometimes when I did not cleanup sockets (using WSACleanup function) and not disposing API objects, at the end or during debugging this application.

The solution for this moment is that I needed to restart my PC, to get all sockets cleaned up, okay.

But, it is not the best solution for when I moved this application to a commercial server. So, there are still some sockets left hanging, when testing this application there, I still get an exception "Invalid Socket Handle". I cannot ask the provider to restart the whole server to get sockets cleaned up?? So I need to find out how I can get sockets cleaned up.

Can anyone help me to get this resolved? Any experience with sockets?
Thanks for advance,
Jeff
Reply With Quote

Registered members have access to special online forex currency trading tools, software, mt4 expert advisors and indicators. Register now

Main Menu

Economic Forecast