Register for your free account! | Forgot your password?

Go Back   elitepvpers > Silkroad Online > SRO Coding Corner
You last visited: Today at 02:34

  • Please register to post and access all features, it's quick, easy and FREE!


Difference between TCPListener and Socket.Listen?

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2013
Posts: 23
Received Thanks: 2
Question Difference between TCPListener and Socket.Listen?

As the title says, -when it comes to sro- is there a difference between TCPListener and Socket.Listen?



ReviveSRO is offline  
Old 06/09/2018, 09:09   #2
 
elite*gold: 0
Join Date: Jan 2009
Posts: 215
Received Thanks: 419
TcpListener or TcpClient provide simpler methods for listening or connecting using the TCP.
Internally they're also using the Socket class, which in contrast also supports different protocols, such as UDP, making it more complicated to use for beginners as functions like Socket.ReceiveFrom are exclusively designed for UDP.
You kinda need to know what you're doing when using Socket.

The only thing relevant for Silkroad is the used protocol being TCP.


DaxterSoul is offline  
Thanks
1 User
Old 06/09/2018, 09:38   #3
 
elite*gold: 0
Join Date: Aug 2013
Posts: 23
Received Thanks: 2
I see, so doesn't matter using either .. I will stick with Socket.Listen then ... thank you Daxter
ReviveSRO is offline  
Old 07/17/2018, 06:15   #4
 
elite*gold: 0
Join Date: May 2006
Posts: 460
Received Thanks: 190
looking at the metadata they are practically the same both inherit from Socket.net class
tcpListener() is a wrapper for a more simple straight-forward stuff.
Socket.Listen() provides a lot more flexibility, that being said it tends to get more complex(not really).
Isoline* is offline  
Reply



« How do I encrypt the ASCII code | Static IP - Failed to Patch Error 2 »

Similar Threads
.net TCPListener.AcceptTCPClient Problem
10/25/2017 - .NET Languages - 3 Replies
Moin, ich möchte n server machen mit multi clients dazu brauch ich ja die tcplistener.acceptcpclient methode welche mir den letzten verbundenen client zurückliefert. Jo soweit so gut hab den code am start Nur ein problem... ES GIBT DIE...
Difference Between Luck and Chance
02/01/2007 - CO2 Guides & Templates - 69 Replies
To be honest when people always say its 4/10 chance (or what ever) and it's then argued with, "No it's luck".. I wanna say what the F**K! For all those too stupid stupid to understand, here finally, the answer!! - When you say it will happen...
OMFG! SOCKET SOCKET SOCKET!
06/29/2006 - CO2 Main - Discussions / Questions - 4 Replies
LUCK! ALL LUCK! CRAZY SOBs! lol ROFFLE COPTER! THERE IS NO TRICK. >:o >:o >:o >:o >:o >:o >:o >:o >:o >:o :eek: :eek: :eek: :eek: :eek: :eek: :eek: :eek: :eek: :eek: All this stupid BS about Sockets is driving me crazy.. If anyone...



All times are GMT +2. The time now is 02:34.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.