How to achieve client server communication using GSOCKET - client-server

I want to use gio and glib to create client-server communication. However, I'm getting confused with GSocket. Can someone give some examples.
Also, how can GMainLoop be helpful in this?

You don't want to use GSocket directly, go for GSocketService and GSocketClient which abstract the messy parts quite nicely.

Related

proxy platforms, what technology they use to achieve this

There are many proxy platforms,
I'd like to know what technology they use to achieve this.
hope get the details, i know some python, but do not know how to get the proxy lists

Is there a socket.io port to Dart?

I've taken a look at the basic websocket capabilities in Dart, using this simple example:
https://github.com/financeCoding/chat-websocket-dart
But I was wondering if there's a nice library I could use to build a realtime online game using websockets. I've had experience in this using node.js with socket.io, which worked out quite well. I need to be able to have "rooms", join rooms, leave rooms, broadcast to clients in a room, etc. as well as some nice notion of connection "health", reconnection etc. So what I'm asking is if there's a nice library for dart that has similar functionality? Even cooler would be a library on top of that library that could enable nice RPC functionality with variable syncing etc. such as http://nowjs.com/ which achieves this using socket.io. But I guess that might be too ambitious.
If anyone's had any experience or found a project which is similar to what I'm talking about, let me know :)
Duct is clone of Socket.IO in Dart which aims to be protocol-level compatible with the original implementation.
https://github.com/petrhosek/duct
Sorry, at the time of this writing, I'm not aware of a socket.io port for Dart. socket.io is nice because it has a bunch of implementation options for browsers that don't support Web sockets.
Sounds like a good idea for a hackathon project!

Socket Hooking / Intercepting / Injecting (Windows)

I think the title is enough for understanding what I need.
What I want to get is a piece of code that injects 1 packet into another software socket.
My research on this turned some ways to accomplish this
I found something about LibPCap, but I don't know if this is able to inject packets too. I know it capture packets.
Another way was to use Hook API (inject some DLL's) ... but I didn't understand this, so I haven't managed to use it.
Port forwarding was another way
None of this was successful for me because I wasn't focused on any of this one. I want to know witch one is the easiest way to implement and I'll be happy to hear your ideas on doing this.
BEFORE POSTING: I'LL USE THIS JUST TO CHECK OUT SOMETHING ON MY PROJECT. I WON'T USE THIS TO HARM OR HACK.
If you can go with a little python, scapy should do the trick quite easily :)

How to set up a computer network with ruby

I would like to set up a network with some computers I have, where they can connect to one main source, then receive and send messages back to it. I have never done any network programming before, so I'm just wondering what are the best tutorials using Ruby that I could use.
Thanks in advance.
There are about a billion ways you could do this. Could you post more about what the problem is you're trying to solve, or what the content/purpose/size/format/etc. of the messages is to be? Are you building something "for real" or just trying to learn network programming?
Also, do you already have the lower layer stuff figured out? You have networking infrastructure setup, IP addresses assigned, etc? If not, you'll need to get through that. Once you have that, you could start with a tutorial on basic socket programming in Ruby, but - depending on the answers to the questions above - you might not want to "roll your own" solution at that level. The answer might be to use an XMPP (Jabber) server, and use an XMPP client library, or you might want to deploy something like ActiveMQ, HornetQ, etc. and use a library for interfacing with that. Or maybe you want to use HTTP and pass messages around in JSON, or XML or $WHATEVER. In short, there are a LOT of options in this area.

Client side http proxy in ruby

What is a good approach to a client proxy written in ruby that I can use to create a custom filter.
So far I've found
Ruby Proxy using webrick
Mousehole, a scriptable Ruby proxy by _why (UPDATE this was not robust)
A little on the fringe, this guy wants to Use rack as thin proxy with his question. I don't think he got an answer; or even a hint that it was possible.
What is your advice on these suggested approaches or do you have a better approach.
Thanks!
I can’t speak on personal experience as I’ve not done this myself, but I have heard of mouseHole before and it seems to be a good package. Why not try writing a simple script for it and see how you find it?
There are also some sample scripts in that repository that you could check out.

Resources