Author Topic: [C++] Beginning socket use  (Read 6824 times)

0 Members and 1 Guest are viewing this topic.

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
[C++] Beginning socket use
« on: October 11, 2005, 07:00:11 pm »
Yeah. Anyone know any good tutorials?

g++, linux 2.6
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline drka

  • ffdshow > in_mp3.dll
  • Full Member
  • ***
  • Posts: 330
    • View Profile
Re: [C++] Beginning socket use
« Reply #1 on: October 11, 2005, 07:49:49 pm »
if you're on windows, MFC

if not, then i dunno. if you have winsock.h or winsock2.h with it, then i think you can. but then again i dont have Linux cause i dont know how to clear a hard drive.

Offline MyndFyre

  • Boticulator Extraordinaire
  • x86
  • Hero Member
  • *****
  • Posts: 4540
  • The wait is over.
    • View Profile
    • JinxBot :: the evolution in boticulation
Re: [C++] Beginning socket use
« Reply #2 on: October 11, 2005, 08:12:36 pm »
wxWidgets provides an open-source, cross-platform library that includes socket support.  The base class is wxSocketBase which has derived classes.
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Our species really annoys me.

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: [C++] Beginning socket use
« Reply #3 on: October 11, 2005, 08:58:32 pm »
Quote
linux 2.6
Quote
if you're on windows, MFC
READ =)
[/size]

I'll give that a look Myndfyre
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline MyndFyre

  • Boticulator Extraordinaire
  • x86
  • Hero Member
  • *****
  • Posts: 4540
  • The wait is over.
    • View Profile
    • JinxBot :: the evolution in boticulation
Re: [C++] Beginning socket use
« Reply #4 on: October 11, 2005, 09:53:46 pm »
Looks like it has event support to, via the Notify, SetNotify, and Callback functions.  :)
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Our species really annoys me.

Offline drka

  • ffdshow > in_mp3.dll
  • Full Member
  • ***
  • Posts: 330
    • View Profile
Re: [C++] Beginning socket use
« Reply #5 on: October 11, 2005, 10:13:57 pm »
Quote
linux 2.6
Quote
if you're on windows, MFC
READ =)
[/size]

I'll give that a look Myndfyre
you and your gayness. MFC is still a good library

Offline Newby

  • Moderator
  • Hero Member
  • *****
  • Posts: 10877
  • Thrash!
    • View Profile
Re: [C++] Beginning socket use
« Reply #6 on: October 11, 2005, 10:50:11 pm »
MFC is still a good library

But, as he stated, he cannot use it in Linux. :P
- Newby
http://www.x86labs.org

Quote
[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT. 

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: [C++] Beginning socket use
« Reply #7 on: October 12, 2005, 08:05:44 am »
MFC is, in my eyes, the CSB of the entire C++ language.
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline MyndFyre

  • Boticulator Extraordinaire
  • x86
  • Hero Member
  • *****
  • Posts: 4540
  • The wait is over.
    • View Profile
    • JinxBot :: the evolution in boticulation
Re: [C++] Beginning socket use
« Reply #8 on: October 12, 2005, 11:51:33 am »
MFC is, in my eyes, the CSB of the entire C++ language.

Damnit, stupid power outage, now I have to start over.

Joe, that's patently retarded.  That's like saying the Java class library, or java.lang.* and javax.swing.* are the CSB of the Java language; or the System and System.Windows.Forms namespaces are the CSB of the .NET Framework languages; or that wxWidgets is the CSB of cross-platform C++.

Most people's problems with MFC stems from its bloat.  If you're using only the Windows part of it (objects deriving from CWnd), you can't specify a way to exclude CSocket from the library, or vice versa.

Plus, MFC is an extremely effective teaching tool for learning the Windows API.  They don't try to hide the fact that it's a wrapper for the Win32 API.  For example, the CWnd class defines the method CWnd::SetWindowPos(const CWnd*, int, int, int, int, UINT), which wraps the Win32 API function SetWindowPos(HWND, HWND, int, int, int, int, UINT).  All the CWnd function does is provide the window handle to the first parameter of the API, and translates the 2nd parameter (a pointer to another CWnd) into a window handle.

Languages and language libraries exist so the developer doesn't have to constantly reinvent the wheel.  If MFC is the CSB of C++, next time, create your own windowing implementation for Java (don't use Swing).
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Our species really annoys me.

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: [C++] Beginning socket use
« Reply #9 on: October 12, 2005, 06:36:48 pm »
man I feel stupid now =p
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline mynameistmp

  • Full Member
  • ***
  • Posts: 111
  • Hi! I'm new here!
    • View Profile
Re: [C++] Beginning socket use
« Reply #10 on: October 17, 2005, 04:33:51 am »
You should read Beej's classic:

http://beej.us/guide/bgnet/