Results 1 to 8 of 8

Thread: [RESOLVED] Winsock, what is it?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2013
    Posts
    985

    Resolved [RESOLVED] Winsock, what is it?

    I have never used or ever even had anything that brought me near this part of programming. since we have an unanswered post just below this post im very curious about it and what its implementation are and why we would need it, I did a quick google search on it and it seams like it allows you to give similar capabilities that a router might give, but im guessing its on a lower level that the router is on. (sorry im forgetting some of the fundamental things in my old age)

    This is the post i was refereeing too.. Link To Post

    Note: im not trying to hijack this im just trying to create awareness.
    Last edited by GBeats; Aug 5th, 2021 at 09:55 AM. Reason: adding a link
    Yes!!!
    Working from home is so much better than working in an office...
    Nothing can beat the combined stress of getting your work done on time whilst
    1. one toddler keeps pressing your AVR's power button
    2. one baby keeps crying for milk
    3. one child keeps running in and out of the house screaming and shouting
    4. one wife keeps nagging you to stop playing on the pc and do some real work.. house chores
    5. working at 1 O'clock in the morning because nobody is awake at that time
    6. being grossly underpaid for all your hard work


  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Winsock, what is it?

    a winsock (windows socket) control or the dll it is based on are a low level network and internet connector, for client /server applications
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2013
    Posts
    985

    Re: Winsock, what is it?

    does this work like an interface might work on .NET, maybe a more broader setup, or more like a router would provide a connection to anything connected to it.
    Yes!!!
    Working from home is so much better than working in an office...
    Nothing can beat the combined stress of getting your work done on time whilst
    1. one toddler keeps pressing your AVR's power button
    2. one baby keeps crying for milk
    3. one child keeps running in and out of the house screaming and shouting
    4. one wife keeps nagging you to stop playing on the pc and do some real work.. house chores
    5. working at 1 O'clock in the morning because nobody is awake at that time
    6. being grossly underpaid for all your hard work


  4. #4
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Winsock, what is it?

    basically you send and receive packets, get the server responses which could be web pages, files or emails, depending what you asked for, read back the packets, assemble the data and display however

    this is a lower level than using a webbrowser object, apis like urldownloadtofile, email or ftp client objects
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  5. #5
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Winsock, what is it?

    Datagrams (UDP) or streams (TCP). There are no "packets." At least not way up at the application level, your side of the socket. Once you start talking about "packets" winsock is a high level API.

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2013
    Posts
    985

    Re: Winsock, what is it?

    Packets are broken down on the NIS level (my memory fails me) if im not mistaken, but its not wrong to have a packet inside a packet, the entire hardrive is working on packets if you think about it, data locations, headers etc. sorry im creating arguments here .

    to put me into perspective and anyone else looking at this, What would be a typical program you would use this on?

    maybe a VPN, an obvious one i think would be a server your building, something like that?
    Yes!!!
    Working from home is so much better than working in an office...
    Nothing can beat the combined stress of getting your work done on time whilst
    1. one toddler keeps pressing your AVR's power button
    2. one baby keeps crying for milk
    3. one child keeps running in and out of the house screaming and shouting
    4. one wife keeps nagging you to stop playing on the pc and do some real work.. house chores
    5. working at 1 O'clock in the morning because nobody is awake at that time
    6. being grossly underpaid for all your hard work


  7. #7
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: Winsock, what is it?

    You're using Winsock right now. What do you think your browser is using to send HTTP requests to this site?

    Here is a sample I posted years ago that shows how to use Winsock in VB.Net.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  8. #8

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2013
    Posts
    985

    Re: Winsock, what is it?

    @Niya, thanks
    i will have a play with that, its always something i wanted to try a server-client setup but never had the opportunity to.
    Yes!!!
    Working from home is so much better than working in an office...
    Nothing can beat the combined stress of getting your work done on time whilst
    1. one toddler keeps pressing your AVR's power button
    2. one baby keeps crying for milk
    3. one child keeps running in and out of the house screaming and shouting
    4. one wife keeps nagging you to stop playing on the pc and do some real work.. house chores
    5. working at 1 O'clock in the morning because nobody is awake at that time
    6. being grossly underpaid for all your hard work


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width