Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decode from tcp stream #372

Open
evanzhang87 opened this issue Jan 19, 2024 · 1 comment
Open

Decode from tcp stream #372

evanzhang87 opened this issue Jan 19, 2024 · 1 comment

Comments

@evanzhang87
Copy link

evanzhang87 commented Jan 19, 2024

What would you like to be added:
I hope HessianCodec can read message from stream, which means body can be from different packet.
Why is this needed:

background

We use gopacket to parse packet from The 4th layer, and then build a 7th layer request(HTTP) to do some interesting things. We want to do the same thing for Dubbo. We already realized a way to parse Dubbo header, but now we want to parse body.

what we want

Like HTTP, a dubbo request/response can also be divided into different packets, but HessianCodec can just parse req/res from a complete packet .

	if h.reader.Buffered() < h.bodyLen {
		return ErrBodyNotEnough
	}

However, reader can get remaining body from the next packet.
If possible, I'd like to contribute code for this.

@tiltwind
Copy link
Contributor

@evanzhang87 it's a great enhancement, contributions are welcome ~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants