---
title: "how can i use 2 independent socket of w5500 as http server and http client at the same time"
url: "https://maker.wiznet.io/forum/14979"
markdown_url: "https://maker.wiznet.io/forum/14979/md"
type: "Forum topic"
category: "Ethernet Chips"
author: "rabia dogan"
created: "2023-07-20T13:54:30+09:00"
last_activity: "2023-08-02T12:51:48+09:00"
language: "en"
views: 527
replies: 5
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# how can i use 2 independent socket of w5500 as http server and http client at the same time

## Question

Asked by rabia dogan on 2023-07-20 in Ethernet Chips.

Hello.
I have a project running wiznet w5500 as http client. I am using the stm32 microprocessor. In the project, I want to remotely view the device settings using the w5500 chip as an http server. The w5500’s datasheet says it has 8 independent sockets. Is it possible to use the w5500 chip as both http client and http server from different sockets at the same time?

## Replies

### Reply 1 by Eugeny, 2023-07-20

Yes. One connects as a client, another listens to specific port as a server.

### Reply 2 by rabia dogan, 2023-07-21 (in reply to reply 1)

Thanks for your answer. Any ideas on how I can do this? When I set my STM32 card as HTTP server and HTTP client, both work separately. But it doesn’t work when I want to make 2 connections at the same time. I run HTTP server and client processes in separate threads. Socket 2 is running as HTTP server, socket 0 is running as HTTP client.

### Reply 3 by Eugeny, 2023-07-21

![](https://avatars.discourse-cdn.com/v4/letter/r/b487fb/48.png) rabia_dogan:

> But it doesn’t work when I want to make 2 connections at the same time

How it does not work? Both treads access one device - maybe it is a problem? Need more detail.

### Reply 4 by rabia dogan, 2023-07-21

I have stm32 card using w5500 chip. I can run http server and http client codes that I wrote separately on this device. However, while the device is running as an http client, I want to view its settings on the web page as an http server at the same time. I am using RTOS on my card and client and server codes are running in separate threads. Is it possible to connect client and server using different sockets over a single ethernet chip?

### Reply 5 by oguzkagan001, 2023-08-02

Selam Rabia
Ben de aynı proje üstünde çalışıyorum. Kodun tamamını atabilir misin? Şimdiden teşekkürler.

---

Source: https://maker.wiznet.io/forum/14979
