Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

WINSOCK-ABSOLUTE BEGINNERS QUESTION

bodhi2016bodhi2016 Member Posts: 50
Guys i am trying to learn the winsock programing from these two sites
http://www.madwizard.org/programming/tutorials/netcpp
http://thedefaced.org/tutorials/C_Winsock_Tutorial_Mulciber.htm

One thing that both the second tutorial is saying is that the
"When you're writing the code presented in this tutorial, make sure that ***libwsock32*** is linked"
What is this linking and how should i link it with my programme .
And if i want to make a winsock programme the connection should be between the server and a client .Suppose if i want to make a connection betwwen my computer and my fathers laptop -can that be made or before that i have to change my computer to a server by installing a software like Apache or Personal Web Server(i may be wrong .I have never used these softwares before .But as far as i know they make the PC to act as a sever when i am connected to the net )and then make my fathers laptop act as a client .Can anybody tell some more good tutorial for winsock programming
[code]WSAData wsdata; //Declare WSAData
WORD wsver=MAKEWORD(2, 0); //We want Winsock 2.0
*/Lobyte is set to two, hibyte is set to 0 */[/code]
this was given as an example in the sceond tutorial
Suppose there is a version of winsock 1.5(say) then the should the code be ]
[code]WSAData wsdata; //Declare WSAData
WORD wsver=MAKEWORD(1,5);
*/Lobyte is set to one, hibyte is set to 5 */
[/code]
How many such versions of such winsock exist
[color=Red]"the WWW uses port 80 by default, FTP uses port 21, e-mail uses 25 (SMTP) and 110 (POP)."-[/color]This is a line from the firsty tutorial
I saw in a magazine that you can stop acessing of hotmail from a computer by closing a range of ports like from port 84(say) to port 100(say) .Is this true ?
But how is this possible i read google uses port 80 but it dosent mean that the client should use port 80 (again i may be wrong)
If such is the case then since everything starts with www then closing port 80 will stop acessing all websites from that computer .(Acoding to the above line marked in red )
How can i know which webserver use which port and how can i close some ports of my computer just for experimenting.




Comments

  • zibadianzibadian Member Posts: 6,349
    : Guys i am trying to learn the winsock programing from these two sites
    : http://www.madwizard.org/programming/tutorials/netcpp
    : http://thedefaced.org/tutorials/C_Winsock_Tutorial_Mulciber.htm
    :
    : One thing that both the second tutorial is saying is that the
    : "When you're writing the code presented in this tutorial, make sure
    : that ***libwsock32*** is linked"
    : What is this linking and how should i link it with my programme .
    : And if i want to make a winsock programme the connection should be
    : between the server and a client .Suppose if i want to make a
    : connection betwwen my computer and my fathers laptop -can that be
    : made or before that i have to change my computer to a server by
    : installing a software like Apache or Personal Web Server(i may be
    : wrong .I have never used these softwares before .But as far as i
    : know they make the PC to act as a sever when i am connected to the
    : net )and then make my fathers laptop act as a client .Can anybody
    : tell some more good tutorial for winsock programming
    : [code]: WSAData wsdata; //Declare WSAData
    : WORD wsver=MAKEWORD(2, 0); //We want Winsock 2.0
    : */Lobyte is set to two, hibyte is set to 0 */[/code]:
    : this was given as an example in the sceond tutorial
    : Suppose there is a version of winsock 1.5(say) then the should the
    : code be ]
    : [code]: WSAData wsdata; //Declare WSAData
    : WORD wsver=MAKEWORD(1,5);
    : */Lobyte is set to one, hibyte is set to 5 */
    : [/code]:
    : How many such versions of such winsock exist
    : [color=Red]"the WWW uses port 80 by default, FTP uses port 21,
    : e-mail uses 25 (SMTP) and 110 (POP)."-[/color]This is a line from
    : the firsty tutorial
    : I saw in a magazine that you can stop acessing of hotmail from a
    : computer by closing a range of ports like from port 84(say) to port
    : 100(say) .Is this true ?
    : But how is this possible i read google uses port 80 but it dosent
    : mean that the client should use port 80 (again i may be wrong)
    : If such is the case then since everything starts with www then
    : closing port 80 will stop acessing all websites from that computer
    : .(Acoding to the above line marked in red )
    : How can i know which webserver use which port and how can i close
    : some ports of my computer just for experimenting.
    :
    :
    For a detailed explanation of ports see: https://www.grc.com/x/ne.dll?bh0bkyd2

    Those ports listed are for servers. Normally closing ports only affect incoming traffic. Thus if you're running a webserver and close the port it listens to, no-one except you can get the webpages. For the question, which port the webserver listens to: if you specify a port (example: http://www.google.com:8080) you try to access that port on the webserver. If the webserver responds then it listens to that port. If you omit the port number from the address, then port 80 is used.

    Most firewalls handle outgoing traffic in a different way: they monitor which application is trying to access which server. Thus if you create a firewall-rule blocking internet access for your webbrowser, then not a single page will be accessible by that browser. More elaborate firewalls allow rules to be created, which redirect certain traffic to other servers (such as a proxy server). Check your firewall documentation on the specifics.
Sign In or Register to comment.