Category : "Coding"

All kinds of Programming.

Code a simple socket server in Python

Python sockets In a previous tutorial we learnt how to do basic . The tutorial explained how to code a socket server and client in python using low level socket api. Check out that tutorial if you are not through on the basics of socket programming in python. To recap, sockets are virtual endpoints of a communication channel that takes place between ...

Output buffering in php and apache

Output Buffering Output buffering is processing mechanism where the output being generated by a program is held in a place till its size reaches a limit or the generation is complete. Only after, will the output be send to its destination. In php for example, doing and echo generates some output. Now this output might be buffered. If its not, then the ...

Php – Do not rely on set_time_limit too much

Php set_time_limit Php has a function called set_time_limit which can be used to dynamically adjust the maximum execution time permitted to a script. It allows specifying the time in seconds and limits the script execution time to that many seconds. The set_time_limit function whenever called, effectively extends the script execution time by that many seconds. So if the script has already run ...

Optimise your database design for speed and efficiency – Part 1

Database schemas Databases are present in almost all kinds of application that need to store information in some form or the other. Web applications like blogs, cms, social networking sites or business applications etc all have a database along with the code. The database design or schema determines how the tables and their relationships are constructed. Database design is a crucial ...

Python socket – chat server and client with code example

Socket based chat application In our previous article on we learned about the basics of creating a socket server and client in python. In this post we are going to write a very simple chat application in python that is powered by sockets. The chat application we are going to make will be more like a chat room, rather than a ...

Code a simple telnet client using sockets in python

The telnet client is a simple commandline utility that is used to connect to socket servers and exchange text messages. Here is an example of how to use telnet to connect to google.com and fetch the homepage. $ telnet google.com 80 The above command will connect to google.com on port 80. $ telnet google.com 80 Trying 74.125.236.69... Connected to google.com. Escape character is '^]'. Now that it ...

ICMP ping flood code using sockets in C – Winsock

In a previous article on we saw how to construct raw icmp echo packets and send them out in large quantities to remote hosts in an attempt to bomb them. Now we are going to construct the same program for windows using the winsock socket api. /* Icmp ping flood program in winsock */ #include "stdio.h" #include "winsock2.h" #include "conio.h" #include "stdint.h" #pragma comment(lib,"ws2_32.lib") //winsock 2.2 ...

ICMP ping flood code using sockets in C – Linux

ICMP Ping Flood Icmp ping flood is a kind of DOS attack that can be performed on remote machines connected via a network. It involves sending a large number of ping echo requests (packets) to the target system such that it is not able to tackle so fast. So the result is that the host either gets too busy into replying ...

Disable output buffering on stdout in c

Like other languages output buffering takes place even in C. Output buffering will cause output of a program to appear in chunks after long intervals, instead of each line appearing the moment it is output. To disable output buffering a very strange piece of code has to be written which looks like this //disable output buffering setvbuf(stdout, NULL, _IONBF, 0); printf('Hello'); Or call the ...

Code a simple tcp socket server in winsock

Communication over sockets involves 2 programs running on the same machine or on separate machines across a network. First is a socket server and the other is a socket client. Tcp stands for Transmission control protocol and it is the most common protocol being used for most of the network communication that takes place over internet or a lan. There ...

Pages:1234567...19»


Connect with us