Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old March 3rd, 2006, 01:06 AM
Nirmald Nirmald is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Posts: 9 Nirmald User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 43 m 59 sec
Reputation Power: 0
Winsock error

Hi,
I use the following code to connect to a port.
[code]
Winsock.Protocol = sckTCPProtocol
Winsock.RemoteHost = "127.0.0.1"
Winsock.RemotePort = 15151 ' this is the port it must be the same as the server
Winsock.Connect

But i get the following error
"Run Time Error '40006'
Wrong Protocol or connection state for the requested transaction or request" is displayed.

I even tried by removing the line "Winsock.Protocol = sckTCPProtocol". Yet i get the same error. Can anyboby help me out.

Thanks in Advance.

Reply With Quote
  #2  
Old March 4th, 2006, 01:49 AM
LozWare's Avatar
LozWare LozWare is offline
Contributing User
ASP Free Novice (500 - 999 posts)
 
Join Date: Jun 2005
Posts: 531 LozWare User rank is Sergeant Major (2000 - 5000 Reputation Level)LozWare User rank is Sergeant Major (2000 - 5000 Reputation Level)LozWare User rank is Sergeant Major (2000 - 5000 Reputation Level)LozWare User rank is Sergeant Major (2000 - 5000 Reputation Level)LozWare User rank is Sergeant Major (2000 - 5000 Reputation Level)LozWare User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 4 Days 10 h 56 m 31 sec
Reputation Power: 46
Send a message via MSN to LozWare
Try this:

Code:
Winsock.Close
Winsock.RemoteHost = "127.0.0.1" 
Winsock.RemotePort = 15151 ' this is the port it must be the same as the server
Winsock.Connect


(you really don’t need to define the protocol, TCP is default)
__________________
LozWare Website Directory

Whooo! Free submissions, no recip needed. I'm a nice guy

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > Winsock error


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT