This paper presents design and implementation technique of Microcontroller-based Real-time WebSocket Server for monitoring and control applications. The main goals of this research are to design and implement a WebSocket Server that can run on various sizes and platforms of microcontrollers. The WebSocket is asynchronous full-duplex communication protocol used to exchange data between a client and a server. All proposed algorithms are designed and implemented as microcontroller platform independent. They are implemented in standard C language which can decrease the size of program memory (Flash/ROM) and data memory (RAM), reduce computational time and also easy to port to other platforms. To evaluate the proposed algorithms, we first design and implement a WebSocket Server that works as both 4-channel data acquisition and 4-channel PWM signal generator running in a microcontroller. The data acquisition and signal generator can be monitored and controlled through internet network using web-based application. In additional, we develop Web-based applications working as 4-channel oscilloscope and 4-channel PWM signal designer to monitor and control the system. The experimental results show that the proposed algorithms can be used for real-time application as expected.