Posted February 15, 200520 yr ive searched over google for hours trying to find a winsock tutorial....anyone know a good site to a winsock tutorial using C++ n not visual C++ or any other language...also it would be good if the site contained files tat i might need to include while doing winsock projs.. thnx
February 15, 200520 yr http://www.google.ca/search?hl=en&safe=active&q=C%2B%2B+winsock+tutorial&btnG=Search&meta= Lol, pooned !
February 15, 200520 yr Author yes i tried em...i dont think any of them are for just C++ n not visual C++
February 15, 200520 yr winsocks is a C API, and thus can be used by C++. Visual C++ is an IDE, and not a language. If your looking for a C++ wrapper there are plenty (i.e. Socket++, ACE Framework, etc). Also, other than a few extra differences, it wouldn't be hard to use a BSD socket tutorial and comform it to windows sockets.
February 15, 200520 yr Author i think ive been learning BSD sockets or w/e its called...i dont really remember since i just started learning yesterday night..........i came upon this tutorial n im not sure if its good http://www.ecst.csuchico.edu/~beej/guide/net/html/
February 15, 200520 yr Well, Beej's Guide is pretty good to get a taste of socket programming, but I'd suggest one of Steven's books such as Unix Network Programming for the long term. Obviously the code isn't going to complete cross over since its written for Unix, but he was one of my favorite author, and many people will agree.
February 15, 200520 yr use c# and .NET cos thats easy as 123 to create shit like that static void Main(string[] args) { string rqst = "GET /index.html"; string host = "localhost"; int port = 80; // Default port for Web servers // Create a client socket connected to port 7 on the local machine TcpClient client = new TcpClient(host, 80); // Construct IO streams on the TcpClient's network stream NetworkStream nStream = client.GetStream(); StreamWriter sOut = new StreamWriter(nStream, System.Text.Encoding.ASCII); StreamReader sIn = new StreamReader(nStream, System.Text.Encoding.ASCII); // Send HTTP request to the server sOut.WriteLine(rqst); sOut.Flush(); // Read the server's response string msgIn = sIn.ReadToEnd(); Console.Out.WriteLine(msgIn); // Close the network streams sOut.Close(); sIn.Close(); nStream.Close(); }
February 16, 200520 yr Author lol wow tat looks realy easy to understand...o well i think ill stick to C++ n finish learning sockets b4 moving on to C#...o yea is everything in Unix a file?
February 16, 200520 yr Yes, and thinking of everything as a file helps simplify programming. This allows you to treat devices, IPC, and files in a generic fashion using basic file IO. You could even read and write to socket connections, which passes a file descriptor on unix (which is unsigned integer passed from the kernel), using the basic IO systems calls such as read and write instead of send and recv.
February 16, 200520 yr C++ dont have serializable and well if your sending alot of data backwards and forwards from machine to machine your better of using a language that has that, otherwise your gonna have to write all your own interpritation stuff when the data gets there, instead of just sending an object
February 16, 200520 yr There is plenty of ready made libraries that offers seralization for you, and many that will be much more portable. A good example of such a library that offers serialization is Boost. Also serialization is a .NET feature (not a C# feature), so you could just use the framework's if portablitly isn't an issue.
February 19, 200520 yr not visual C++ or any other language Can you show me some visual c++ syntax please? I have never seen it and am quite interested.
February 19, 200520 yr Author download MS VC++ from MSDN sites....the syntax is very similar but a bit different...
February 19, 200520 yr I fail to see how, or why for that matter. What would be the advantage of making a compiler that won't work with conventional programming practices?
February 19, 200520 yr visual C++ and C++ are the same thing u r the most retarded person ive ever met, and also you seem to enjoy calling yourself l33t, and then asking a fucking n00bish question three seconds later. also learn to not post every 5 seconds. half the posts on this forum are from you :dfinger: :fawk: psh :owned:
February 19, 200520 yr Author i have no clue....the syntax wasnt all tat different...just tat if u put replace i forgot wat the code was...with int main()..it returns an error