Thread: C network programming question?

  1. #1
    Registered User
    Join Date
    Nov 2016
    Posts
    4

    C network programming question?

    Python and Java are good for network programming, I like C,
    I just want to ask can I make network programming (all kind of network programming) with C
    like Python or Java, or should I use C++?

  2. #2
    Registered User
    Join Date
    Feb 2019
    Posts
    1,078

  3. #3
    Registered User
    Join Date
    Nov 2016
    Posts
    4
    Quote Originally Posted by flp1969 View Post
    Thank you sir but I an new and just want to answer my questions.

  4. #4
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    That a guide to network programming in C exists means that yes, network programming in C is possible.

    Should you use C? That's hard to answer without further information on what you're trying to do, what environments you're programming for, what skill set you (and your team, if any) already have, etc.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  5. #5
    Registered User
    Join Date
    Dec 2017
    Posts
    1,633
    The answer is "yes, you can use C". And flp has pointed you to a standard beginner's guide.
    A little inaccuracy saves tons of explanation. - H.H. Munro

  6. #6
    Registered User
    Join Date
    Nov 2016
    Posts
    4
    Thank you all, more questions please, Can C networking do C++ networking? Is there is network library for C?

  7. #7
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by cempa88
    Can C networking do C++ networking?
    I'm curious as to what motivated you to ask this question. Do you really know both C and C++? Are you aware that despite their common heritage, and that C programs can be written to be compilable as C++, they are very different languages?

    Quote Originally Posted by cempa88
    Is there is network library for C?
    Obviously. If you're talking about standard C, then no.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  8. #8
    Registered User
    Join Date
    Dec 2017
    Posts
    1,633
    Windows: WinSock2
    Linux: Sockets
    A little inaccuracy saves tons of explanation. - H.H. Munro

  9. #9
    Registered User
    Join Date
    Feb 2019
    Posts
    1,078
    As john.c and laserlight told you, of course there are libraries. Sockets (and WinSocket 2, on Windows) are provided by the operating system (or the C library - glibc, for GCC, for instance). But there are high level libraries as well... For example: libnet, libcurl, libmicrohttpd, ...

    Lots and lots of them... You just need to do some research...

  10. #10
    Registered User
    Join Date
    Nov 2016
    Posts
    4
    Thank you all

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C network programming question
    By Hayk in forum C Programming
    Replies: 8
    Last Post: 01-17-2017, 03:31 PM
  2. Telnet Network programming Question
    By errigour in forum C Programming
    Replies: 1
    Last Post: 12-02-2010, 09:13 AM
  3. windows network programming noob question
    By mramazing in forum Networking/Device Communication
    Replies: 6
    Last Post: 01-27-2009, 04:20 PM
  4. Network Programming C / C++ question..
    By C_Me_33 in forum Networking/Device Communication
    Replies: 10
    Last Post: 09-13-2006, 01:28 PM
  5. Want Some Help on Network Programming..
    By Ankit_mcg in forum C Programming
    Replies: 2
    Last Post: 04-17-2002, 11:40 AM

Tags for this Thread