# Difference between Socket level data and WinINet level data in Loadrunner


When giving training to the newbies, they often ask what is the difference between socket level data and WinINet level data in loadrunner recording options and when to use socket level data and WinINet level data. So I thought of having one article on that, Read on…

The Windows Internet (WinINet) API was implemented by Microsoft for windows operating system to interact with various application level protocols like http, ftp etc to access internet resources. 
> 
Whereas The Socket Level API was implemented by Loadrunner for **various operating systems** to interact with various application level protocols like http, ftp etc to access internet resources.


By opting Vugen to record at WinINet level, simply LoadRunner records traffic that is generated by the application which uses the WinINet API to communicate to the servers, i.e it attempts to capture traffic at the WinINet level. Whereas, by opting the Socket level, you are instructing Vugen capture the traffic on the socket-level at a specified port, bypassing any WinINet API.

I hope now you got some idea on what is WinINet and socket level data, now question is how we know which one to choose during recording?

There is no straight answer for this, we have to choose based on trial and error principle. When an application fail in recording you can try by switching between them.

VuGen has two HTTP replay engines namely Sockets-based and WinInet based. The WinInet is the windows native engine used by Internet Explorer and it supports all of the features supported by IE. Whereas Socket based engine is default engine implemented by hp loadrunner team.

Sometimes web applications maybe designed in WinINet, for that applications if we use socket based replay engine will face replay errors instead of that we have to go for WinINet replay. But most of times socket level will be sufficient.

WinInet replay engine is for windows only; it won’t support UNIX, linux like operating systems, whereas socket based replay engine will support various operating systems.

While running scripts using WinInet replay engine, resource utilizations in load generator will be high, whereas socket based replay engine is a lighter engine that is good for load testing.

While running scripts using WinInet replay engine, we have to run Vuser as process instead of thread hence it requires more resources and load generators.
